Re: Perceptron Learning Algorithm
I understand how to write the code to generate a random line and random points, which are assigned +/ based on their location relative to the line. (I'm assuming that [1,1]x[1,1] means the xy plane (the typical axis that I've been seeing since middle school... correct me if I'm wrong and that notation means something like binary space...)
I understand setting the initial weights to 0.
Here is where I'm getting confused:
When you say "sign(w0+w1x1+w2x2)", where if the function is positive, the outcome is +1 and visa versa, does the function itself actually generate a negative number? If so, how do you get it to generate a negative number when your learning algorithm takes steps of positive 1?
Let's say that my f function is something simple like y=2x. Let's say that my random points lie on each side of the line such that I end up with the following points:
(1,1,3), (1,3,7), (1,2,3), and (1,4,7). These map ++ and  , since they are on opposite sides of the line.
During the initial step, setting the weights equal to zero yields zero on each of these functions. So, we iterate once by setting the weights equal to 1. Plugging the weights into the first two points yields a positive value. (1+1+3) and (1+3+7) Yet, the bottom two points are still positive. As long as my iterative step is a positive 1, I can't get a negative number in the bottom rows. How does that work? Is that even how the learning is supposed to function?
