Adaptive Boosting Algorithm
Adaptive Boosting (AdaBoost) is an
ensembled machine learning algorithm. The key idea is:
- Improving the weights of mis-classified instances.
- Voting by a sort of weak classifiers can lead to a strong classifier.
- Better weak classifiers should have greater weights to vote.
AdaBoost is sensitive to noisy data and outliers.
- Train instances: T={(x1,y1),(x2,y2),⋯,(xN,yN)},
where N is the number of instances, xi∈Rn, yi∈{−1,+1},
i=1,2,⋯,N, n is the number of features.
- Weak binary classifiers: H={h1,h2,⋯,hM}, where M is the number of
classifiers, hi(x)∈{−1,+1}, i=1,2,⋯,M.
- Max iteration times K.
Output
-
A strong binary classifier G(x)=sgn(∑i=1Naihi(x)),
where
sgn(x)={+1−1x≥0x≥0
ai is the weights of weak classifiers.
Pseudo Code
AdaBoost(K,X,Y,H)Initialize weights of instances D=d1,1d2,1⋮dM,1d1,2d2,2⋮dM,2⋯⋯⋱⋯d1,Nd2,N⋮dM,N←N1N1⋮N1N1N1⋮N1⋯⋯⋱⋯N1N1N1N1Repeat K times:for hi∈H:Train hi using X,Y with DError rate ei=N1j=1∑NP(hi(xj)=yj)Weights of classifiers ai=21logei1−eiUpdate weights of instances di,j←{di,j×e−aidi,j×eaihi(xj)=yjhi(xj)=yjNormalize weights of instances di,j←∑j=1Ndi,jdi,jreturn G(x)=sgn(i=1∑Naihi(x))
References