4.6 LINEAR MODELS 127
While some instances are misclassified
for every instance a
classify a using the current weights
if the predicted class is incorrect
if a belongs to the first class
for each ai that is 1, multiply wi by a
(if ai is 0, leave wi unchanged)
otherwise
for each ai that is 1, divide wi by a
(if ai is 0, leave wi unchanged)
(a)
While some instances are misclassified
for every instance a
classify a using the current weights
if the predicted class is incorrect
if a belongs to the first class
for each ai that is 1,
multiply wi+ by a
divide wi– by a
(if ai is 0, leave wi+ and wi- unchanged)
otherwise for
for each ai that is 1,
multiply wi– by a
divide wi+ by a
(if ai is 0, leave wi+ and wi- unchanged)
(b)
Figure 4.11The Winnow algorithm: (a) the unbalanced version and (b) the balanced
version.