Skip to main content
Add tags
Link
Tran Khanh
  • 670
  • 4
  • 9
Source Link
Tran Khanh
  • 670
  • 4
  • 9

Why there are two different versions for batch perceptron algorithm?

In the book "Understanding Machine Learning, S. David Ben et al.", the authors describe the Batch Perceptron Algorithm as follows:

Batch perceptron version 1

However, in the book "Python Machine Learning, Sebastian Raschka et al., 2nd edition", the authors describe the algorithm as follows:

Batch perceptron version 2

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?