![]() |
#1
|
|||
|
|||
![]()
I'm trying to program the perceptron example but can't figure out how to assign the sign of the first step.
I drew a line between two points on the xy plane [-1,1] in both directions. Then I randomly generated another 10 points, assigning them +1 if they fell above the line and -1 if they fell below the line. I stored those values in ideal function g. Then I gave each point a random first guess of +1/-1 as my initial function h. If I start with all the weights as 0, then w*x = 0 for all points. At that rate, PLA will never converge. What is my conceptual error? |
#2
|
||||
|
||||
![]() Quote:
![]() ![]() ![]() Quote:
![]() ![]() Quote:
![]() ![]() ![]()
__________________
Where everyone thinks alike, no one thinks very much |
#3
|
|||
|
|||
![]()
Hi
I have a question about how weighting is assigned and the meaning of the PLA . For point a1 which has assignment 1, does w(a1.y) + w(a1.x) = 1 ? ( '.' denotes subscript) And then, for point a2 which has assignment -1, would w(a1.y) + w(a1.x) + w(a1.x) + w(a2.x) = -1 , and so on? To adjust weighting of w for misclassified points, is w.x2 = w.x1 + x.2 * y.2 Thank you for the help! |
#4
|
||||
|
||||
![]() Quote:
![]() ![]() ![]() ![]() Either point, call it just ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() where ![]() ![]() ![]() Example: Say the first data point ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
__________________
Where everyone thinks alike, no one thinks very much |
#5
|
|||
|
|||
![]()
Thank you for your reply!
So, y.n for point 2 has nothing to do with point 1, correct? Also, since w.0, w.1 and w.2 are different numbers, do you need multiple points to assess the values of the three w's? Further, is updated w like an array, dependent on which n is being chosen, or is it one uniform number that is applied to all x's? |
#6
|
||||
|
||||
![]() Quote:
All three components of the weight vector ![]() ![]()
__________________
Where everyone thinks alike, no one thinks very much |
#7
|
|||
|
|||
![]()
Hello!
I have some misuderstandings with PLA. Should we update w accordings to only one misclassified point at an iteration or through all the misclassified points at the given iteration? thanks |
#8
|
||||
|
||||
![]()
One misclassified point at a time, and that's what counts as an iteration.
__________________
Where everyone thinks alike, no one thinks very much |
#9
|
|||
|
|||
![]() Quote:
I think it would be interesting if we can all input our actual numbers and you later show a histogram of what people entered on their homework solutions. ;-) I'm shocked by the speed with which PLA converges. I never would have guessed that until I actually coded it up. This is a very interesting and intellectually satisfying exercise! I'm having a hard time deciding how to answer the multiple choice Q 7-10. The answer depends upon if I use log or linear scaling. Aren't CS algorithm efficiencies usually classified in log scaling? Or am I over-thinking this? If an algorithm always converges would the Pr(f(x) ne g(x)) = 0? |
#10
|
|||
|
|||
![]() Quote:
For my code, I consider 1 iteration as a scan from beginning to end through the entire data set x and correcting any misclassified points. I have already submitted my homework and I believe I cannot resubmit. Thanks, KK. |
![]() |
Thread Tools | |
Display Modes | |
|
|