![](/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.