Correct implementation of AdaBoost.