In the book "Understanding Machine Learning, S. David Ben et al.", the authors describe the Batch Perceptron Algorithm as follows:
However, in the book "Python Machine Learning, Sebastian Raschka et al., 2nd edition", the authors describe the algorithm as follows:
Which is, to my calculation, don't look quite the same in the sense that they would not return the same weight vector, at least for the first several iterations.
So my question is: Which is the "correct" version of the algorithm and would the difference in the two affect the generalization of the algorithms' final outputs, that is, how would we account for the difference in the generalization error $\epsilon_{est}=L_\mathcal{D}(h_S)-L_\mathcal{D}(h_{bayes})$ in the two versions?