提升方法 AdaBoost
机器学习
AdaBoost
Input: Training set T={(x1,y1),(x2,y2),…,(xN,yN)}, xi∈X⊆Rn; A weak learning algorithm.
Output: Classifier G(x).
Initialize weight distribution
D1=(w11,…,w1N),w1i=1N,i=1,2,…,N
For m=1,2,…,M:
- Train classfier Gm(x):X→{−1,+1} with weight distribution Dm;
- Define error rate:
em=∑i=1NwmiI(Gm(xi)≠yi)
- Define Gm(x) factor α as:
am=12log1−emem
- Update weight distribution of training set Dm+1=(wm+1,1,wm+1,2,…,wm+1,N):
wm+1,i=wmiZmexp(−αmyiGm(xi))
where Zm=∑Ni=1wmiexp(−αmyiGm(xi)).
- Construct linear combination of basic classifiers:
G(x)=sign(f(x))=sign(∑m=1MαmGm(x))
Forward Stagewise Additive Modeling
AdaBoost is a special case of Forward Stagewise Additive Modeling, with basic classifier as addictive model and exponential function as loss function.
Input: Training set T={(x1,y1),(x2,y2),…,(xN,yN)}, xi∈X⊆Rn; Loss function L(y,f(x)); Base function set {b(x;γ)}.
Output: Additive model f(x).
- Initialize f0(x)=0;
- For m=1,2,…,M:
- Minimize loss function
(βm,γm)=argmaxβ,γ∑i=1NL(yi,fm−1(xi)+βb(xi;γ))
- Update fm(x)=fm−1(x)+βmb(x;γm);
- Obtain addictive model:
f(x)=fM(x)=∑m=1MβMb(x;γm)
Boosting Tree
Boosting Tree is one kind of boosting with regression tree or classification tree as basic classifier. Boosting tree model can be presented as additive model of decision tree
fM(x)=∑i=1MT(x;Θm)
Input: Training set T={(x1,y1),(x2,y2),…,(xN,yN)}, xi∈X⊆Rn; yi∈Y⊆R.
Output: Boosting tree fM(x).
- Initialize f0(x)=0;
- For m=1,2,…,M:
- Calculate residue
rmi=yi−fm−1(xi),i=1,2,…,N
- Learn a regression tree fitting residue rm, obtain T(x;Θm);
- Update fm(x)=fm−1(x)+T(x;Θm);
- Obtain regression boosting tree:
fM(x)=∑m=1MT(x;Θm)