LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > Homework 1

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2012, 06:39 AM
dsvav dsvav is offline
Junior Member
 
Join Date: Jul 2012
Posts: 8
Default Drawing boundary line for PLA

Hello,

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.
Reply With Quote
  #2  
Old 07-16-2012, 12:33 PM
rainbow rainbow is offline
Member
 
Join Date: Jul 2012
Posts: 41
Default 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.
Reply With Quote
  #3  
Old 07-16-2012, 04:07 PM
JohnH JohnH is offline
Member
 
Join Date: Jul 2012
Posts: 43
Default 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
\end{cases}

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.
Reply With Quote
  #4  
Old 07-17-2012, 06:09 AM
dsvav dsvav is offline
Junior Member
 
Join Date: Jul 2012
Posts: 8
Default Re: Drawing boundary line for PLA

Thanks JohnH and rainbow.
Reply With Quote
Reply

Tags
perceptron

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 03:00 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.