纸上得来终觉浅,觉知此事要躬行。综上,我什莫都不懂.这仅仅是个人的学习防忘笔记
Adaboost
关于 Adaboost 的算法描述其实很简单,有趣的是的它的误差分析:
algorithm
其中
ϵ t = P r { i ∼ D t } [ h t ( x i ) ≠ y i ] = ∑ D t ( i ) I ( h t ( x i ) ≠ y i ) α t = 2 − 1 log ( 1 − ϵ t ϵ t ) \begin{aligned} \epsilon_t &= Pr_\{i\sim D_t\}[h_t(x_i)\ne y_i]\\ &=\sum D_t(i)I(h_t(x_i)\ne y_i)\\ \alpha_t &= 2^{-1}\log (\frac{1-\epsilon_t}{\epsilon_t}) \end{aligned} ϵtαt=Pr{ i∼Dt}[ht(xi)̸=yi]=∑Dt(i)I(ht(xi)̸=yi)=2−1log(ϵt1−ϵt)
PS : 稍后会证明,为什么, α t \alpha_t αt 取这个值
training error
第一个不等式就不说了,分析,equal 和not equal 两种情况就好,我们来看第二个等式。
其实第二个等式非常简单,我们只需要将 D t D_t Dt 的递推式展开就好了:
D 2 ( i ) = m − 1 exp ( − α 1 y i h 1 ( x i ) ) Z 1 , Z t i s n o r m l i z e t e r m , a c o n s t , f o r i ∈ 1 , . . . , T D 3 ( i ) = D 2 ( i ) exp ( − α 2 y i h 2 ( x i ) ) Z 2 = m − 1 exp ( − y i ( α 1 h 1 ( x i ) + α 2 h 2 ( x i ) ) ) Z 1 Z 2 D T + 1 = m − 1 exp ( − y i ( ∑ α t h t ( x i ) ) ) ∏ t Z t b e c o u s e ∑ i D t ( i ) = 1 , s u m a t l e f t t e r m a n d r i g h t t e r m ∏ t Z t = ∑ i m − 1 exp ( − y i ( ∑ α t h t ( x i ) ) ) \begin{aligned} D_2(i)&=\frac{m^{-1}\exp (-\alpha_1y_ih_1(x_i))}{Z_1},Z_t\ is\ normlize\ term,a \ const,for\ i \in {1,...,T}\\ D_3(i)&=\frac{D_2(i)\exp(-\alpha_2y_ih_2(x_i))}{Z_2}\\ &=\frac{m^{-1}\exp(-y_i(\alpha_1h_1(x_i)+\alpha_2h_2(x_i)))}{Z_1Z_2}\\ D_{T+1}&=\frac{m^{-1}\exp(-y_i(\sum \alpha_th_t(x_i)))}{\prod_t Z_t}\\ becouse \sum_i D_t(i)=1,& sum\ at\ left\ term\ and\ right\ term\\ \prod_t Z_t&=\sum_i m^{-1}\exp(-y_i(\sum \alpha_th_t(x_i))) \end{aligned} D2(i)D3(i)