4
$\begingroup$

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?

$\endgroup$

1 Answer 1

2
$\begingroup$

I was comparing the two versions with the learning rate in the second book set to $1$ (the default value) and found the difference. But it's not the case here, instead if the learning rate is set to $0.5$ then the algorithms in both cases are essentially the same.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.