Quote:
Originally Posted by davies
Hello Professor,
I have a question regarding updating w on each PLA iteration. If we always assign x0 = 1, how are we reasonably updating w0? By the vector addition, it will always be updated by the value y * x0 = 1 or +1, and if the true w0 is not an integer the PLA will never be able to converge to that value.
Would it be more appropriate to setup such that we divide each component of the true w by w0, so that w0 = 1 always? This way I know it is an integer and my PLA does not have to wander for a noninteger value. Or even, if I know w0 is always 1, I might not even include it in the PLA since I know it is 1 by setup.
Thank you,
Aaron

I had the exact same question. I believe your method of updating is the correct way:
w_0 = w_0 + y_i
However, there is usually a learning rate associated with the perceptron such as alpha, which would make the update on the intercept:
w_0 = w_0 + alpha * y_i
So you can see here that the algorithm would accommodate noninteger values. In our case, without a learning rate, we just have to hope it converges with an integer value intercept.
I actually had one case myself where it wouldn't converge. To avoid biasing my average results, I'm going to just run the algorithm to 100k iterations and throw out anything that doesn't fully converge.