Given n feature vectors x 1=(x 11,…,x 1p ),..., x n =(x n1,…,x np ) of size p, a vector of class labels y=(y 1,…,y n ), where y i K = {-1, 1} describes the class to which the feature vector x i belongs, and a weak learner algorithm, the problem is to build an AdaBoost classifier.

Training Stage

The following scheme shows the major steps of the algorithm:

  1. Initialize weights D 1(i) = 1/n for i = 1,...,n

  2. For t = 1,...,T:

    1. Train the weak learner h t (t) {-1, 1} using weights D t

    2. Choose a confidence value α t

    3. Update

      where Z t is a normalization factor

  3. Output the final hypothesis:

Prediction Stage

Given the AdaBoost classifier and r feature vectors x 1,…,x r , the problem is to calculate the final class

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)