![](/img/trans.png)
[英]How is the decision boundary piloted after the parameters theta are updated
[英]How to draw decision boundary once we get the value of theta?
我正在解決斯坦福大學提供的一項練習,吳安德(Andrew Ng)的機器學習課程。 問題是( http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=MachineLearning&doc=exercises/ex4/ex4.html )在給定數據上繪制決策邊界,然后估計新數據的結果。 我已經使用fminunc函數來計算theta。
我有三個theta值。 但是為了畫一條線,我們只需要兩個theta,那么第三個theta值的需求是什么。
我無法繪制決策邊界。 請幫幫我。
據說您添加了一個截距項,因此theta具有三個維度是正常的:兩個梯度(根據X和Y加上偏差項)。 如果theta_1是偏差項,theta_2是X梯度,theta_3是Y梯度,則線的方程式為:
Y = -theta_2 / theta_3。* X + theta_1
最好的祝福
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.