LFD Book Forum  

Go Back   LFD Book Forum > Book Feedback - Learning From Data > Chapter 1 - The Learning Problem

Reply
 
Thread Tools Display Modes
  #1  
Old 09-25-2013, 09:20 PM
Ahmed.Elkayesh Ahmed.Elkayesh is offline
Junior Member
 
Join Date: Sep 2013
Location: Earth
Posts: 1
Default 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.


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
Reply With Quote
  #2  
Old 09-27-2013, 11:18 PM
yaser's Avatar
yaser yaser is offline
Caltech
 
Join Date: Aug 2009
Location: Pasadena, California, USA
Posts: 1,477
Default Re: How to draw the separating line in 2D input

Quote:
Originally Posted by Ahmed.Elkayesh View Post
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.


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.
__________________
Where everyone thinks alike, no one thinks very much
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:28 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.