Manually plotting straight boundary line in Perceptron

后端 未结 1 1987
梦如初夏
梦如初夏 2021-01-26 16:27

[The material belongs to the Coursera Machine Learning course by Andrew Ng]

I got one of the exercises to work in R (I could have opted for Python - not essential to the

相关标签:
1条回答
  • 2021-01-26 17:16

    The answer is actually quite easy:

    The boundary is at:

    0 = theta_0 + theta_1 x_1 + theta_2 x_2
    

    Hence, since the plot is of x_2 versus x_1, we choose two extreme points along x_1 and calculate the expected x_2 at the decision boundary:

    x_2 = (- 1 / theta_2) * (theta_0 + theta_1 x_1)
    
    0 讨论(0)
提交回复
热议问题