1. Training Idea
- When training an AdaBoost model, the algorithm starts by training a base classifier on the original dataset.
- The algorithm then increases the weights of the misclassified instances and trains another classifier on the dataset.
- This iterative process continues until a specified number of classifiers are trained or the model achieves a perfect score.
- AdaBoost is similar to gradient descent, but instead of tweaking a single model’s parameters to minimize a cost function, AdaBoost adds models to the ensemble, making the new model correct the errors of its predecessor.
- Once the training is complete, the model makes predictions using the ensemble of classifiers.
2. Algorithm
-
Initialize the weights of the instances:
-
Train a base classifier on the dataset, and compute the weighted error rate:
-
Compute the predictor’s weight:
-
Update the weights of the instances:
-
Normalize the weights:
-
Repeat steps 2-5 using the updated weights, until the desired number of classifiers is reached.
-
Make predictions using the ensemble of classifiers: