While doing the last cell for this lab, there’s two lines that I don’t understand.
“x0 = -b_out/w_out[0]
x1 = -b_out/w_out[1]”
I don’t understand how and why the equation is like this for deciding the decision boundary. I understand how b_out and w_out values were obtained, but I’m not understanding how doing that equation will give the correct values for the decision boundary.
Screenshot included.
Hello, @Grimmlen417,
Then we need to first think about what is the condition for a line to be a decision boundary.
Look first at our model:
We can say that
Here, we need to focus on the last equation which says that the condition is a line in the x_0-x_1 coordinate system.
To draw a line, you only need to know two points on that line. To find the first point, you may substitute x_0 = 0 and find the corresponding x_1. To find the second one, you may substitute x_1 = 0 and find the corresponding x_0. I will leave those substitutions as your exercises and you can find the answers in your screenshot 
You get two points, you connect them to draw a line, and that’s the line that satisfies the aforementioned condition which is the condition for boundary.
Cheers,
Raymond
2 Likes
Ohh I see now. Just manipulating that equation to get the two points, x0 and x1.
Thank you!
1 Like
You are welcome, @Grimmlen417!