LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Chapter 1 - The Learning Problem (http://book.caltech.edu/bookforum/forumdisplay.php?f=108)
-   -   How to draw the separating line in 2D input (http://book.caltech.edu/bookforum/showthread.php?t=4422)

Ahmed.Elkayesh 09-25-2013 09:20 PM

How to draw the separating line in 2D input
 
This is my first post to the forum and I would like to thank the book authors for the availability online and for choosing to make the book price low.

:clueless:
I have a question and I hope someone will help me answer it

In a 2D input space, we have the components in the W vector, w0 for the bias, and w1, w2 for the 2 dimensions of the input.

If the learning algorithm successfully found the W that could classify all input correctly, how is it possible to draw the separation line(or vector) using the 3 components of the W vector?

How could we map w0,w1,w2 to the Line equation y = ax+ b.


Thanks

Ahmed

yaser 09-27-2013 11:18 PM

Re: How to draw the separating line in 2D input
 
Quote:

Originally Posted by Ahmed.Elkayesh (Post 11510)
This is my first post to the forum and I would like to thank the book authors for the availability online and for choosing to make the book price low.

:clueless:
I have a question and I hope someone will help me answer it

In a 2D input space, we have the components in the W vector, w0 for the bias, and w1, w2 for the 2 dimensions of the input.

If the learning algorithm successfully found the W that could classify all input correctly, how is it possible to draw the separation line(or vector) using the 3 components of the W vector?

How could we map w0,w1,w2 to the Line equation y = ax+ b.


Thanks

Ahmed

The line would be {\bf w}^T {\bf x}=0 which expands as w_0x_0+w_1x_1+w_2x_2=0 with x_0=1 and (x_1,x_2) being the (x,y) coordinates in the conventional y=ax+b formulation. As you can see, you need to diivide out by w_2 to get the coefficient of x_2 which is y to be 1, hence the discrepancy between the 3 parameters in one formulation and the 2 parameters in the other formulation.


All times are GMT -7. The time now is 12:15 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.