How do I include the Bias term in the Pegasos algorithm?
I have been asked to implement the Pegasos algorithm as below. It is similar to the Peceptron algorithm but includes eta and lambda terms. However, there is no bias term below and I don't know how to include it in either the condition or the update. I think the update is just W0 - W0 + eta*y[i,t], but it should only be updated if the condition is satisfied, and I used the condition below which ignores bias.
Any ideas how to include the bias in the condition and update?
Topic perceptron machine-learning
Category Data Science