LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 1 (http://book.caltech.edu/bookforum/forumdisplay.php?f=130)
-   -   Drawing boundary line for PLA (http://book.caltech.edu/bookforum/showthread.php?t=860)

dsvav 07-16-2012 06:39 AM

Drawing boundary line for PLA

This is not exactly related to HW(which I have submitted).

I want to visually observe how boundary line changes after each iteration i.e I want to know how to draw a boundary line after each iteration of PLA.

Initial or actual boundary line (rep target function) is known to me since it is selected as two random points and I can draw the line. One iteration gives me a new weight vector , so how do I relate this to boundary line.

Thanks and I apologize for any wrong use terminologies.

rainbow 07-16-2012 12:33 PM

Re: Drawing boundary line for PLA
Since we use the sign function, I presume the decision boundary is
g(x) = w'x = 0 (including the bias w_0)

One strategy could be to generate values on the grid [-1,1] x [-1,1], and plot where g evaluates to 0. But that is costly for each iteration. Hopefully there is a better approach.

JohnH 07-16-2012 04:07 PM

Re: Drawing boundary line for PLA
The following are the equations for the plot of the learned boundary line:

\begin{cases}x=-\dfrac{w_{0}}{w_{1}}, & $for $ w_{2}=0\\\\
{w_{2}}y=-w_{1}x-w_{0}, & $for $ w_{2}<>0

If {w_{1}} or {w_{2}} is 0, then the corresponding component of the input vector does not contribute to the result and the boundary is a horizontal or vertical line, respectively.

dsvav 07-17-2012 06:09 AM

Re: Drawing boundary line for PLA
Thanks JohnH and rainbow.

All times are GMT -7. The time now is 05:52 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2022, 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.