AdaBoost
A model based on Boosting.
Training
We have Dataset with samples .
- Initialize lists
- List to hold weights:
- List to hold classifiers:
- List to hold weight-updates:
- Initialize weigths for first classifier so that each tuple has the same probability.
- Generate classifiers in iterations
- At iteration do:
- Calculate normalized weights:
- Use Bootstap method to sample Dataset with replacement according to the previously assigned weights to form the training set for classifier
- Derive model from
- Test model with test set by calculating error as the sum of all missclassified weights
- If this error is bigger than go back to step 4.1 and abandon this classifier
- Calculate the weight update as
- Update weigths for the next iteration by multiplying them with if they have been correctly classified: thus reducing the weight if they were classified correctly and leaving the weight as it is if it has been missclassified.
- Add to their respective lists
Prediction
- Initialize weigths of each class to zero
- For each classifier
- Calculate weight of its vote:
- Get prediction from that weak classifier
- Add to the weight for class
- Return class with the largest weight
Or in short: