machine learning - How do you draw a line using the weight vector in a Linear Perceptron? -
i understand following:
in 2d space, each data point has 2 features: x , y. weight vector in 2d space contains 3 values [bias, w0, w1] can rewritten [w0,w1,w2]. each datapoint needs artificial coordinate [1, x, y] purposes of calculating dot product between , weights vector.
the learning rule used update weights vector each misclassfied point w := w + yn * xn
my question is: how derive 2 points weight vector w = [a, b, c] in order graph decision boundary?
i understand + bx + cy = 0 linear equation in general form (a, b, c can taken weights vector) don't know how plot it.
thanks in advance.
the best way draw line find minimum x value , maximum x value on display axis. calculate y values using known line equation (-(a+bx)/c). result in 2 points use inbuilt plot command draw line.
Comments
Post a Comment