1. a2newa_2^{new}a​2​new​​的修剪

根据对偶函数的限制条件可知:
0a1C0a2C1 \begin{aligned} 0 \le a_1 \le C \\ 0 \le a_2 \le C && {1} \end{aligned}

a2a_2a1a_1表示得:
0ξa2y2y1C2 \begin{aligned} 0 \le \frac {-\xi - a_2y_2}{y_1} \le C &&{2} \end{aligned}

由于y1y_1y2y_2的取值只能是1或者-1,而1或-1会对不等号的化简影响不同,所以把公式(2)分成4种情况:

  1. y1=y2=1y_1 = y_2 = 1
    Cξa2ξa1+a2=ξ \begin{aligned} -C - \xi \le a_2 \le -\xi \\ a_1+a_2=-\xi \end{aligned} 得:
    C+a1+a2a2newa1+a2 -C+a_1+a_2 \le a_2^{new} \le a_1 + a_2

  2. y1=1,y2=1y_1 = 1, y_2 = -1
    ξa2C+ξa2a1=ξ \begin{aligned} \xi \le a_2 \le C+\xi \\ a_2 - a_1 = \xi \end{aligned} 得:
    a2a1a2newC+a2a1 a_2 - a_1 \le a_2^{new} \le C + a_2 - a_1

  3. y1=1,y2=1y_1 = -1, y_2 = 1 ξa2Cξa2a1=ξ \begin{aligned} -\xi \le a_2 \le C-\xi \\ a_2 - a_1 = -\xi \end{aligned} 得:
    a2a1a2newC+a2a1 a_2 - a_1 \le a_2^{new} \le C + a_2 - a_1

  4. y1=y2=1y_1 = y_2 = -1
    ξCa2ξa1+a2=ξ \begin{aligned} \xi-C \le a_2 \le \xi \\ a_1 + a_2 = \xi \end{aligned} 得:
    C+a1+a2a2newa1+a2 -C+a_1+a_2 \le a_2^{new} \le a_1 + a_2

综合以上结果得:
当y1y2<0时, max(0,a2a1)a2newmin(C,C+a2a1) \max (0, a_2 - a_1) \le a_2^{new} \le \min(C, C + a_2 - a_1) 当y1y2>0时, max(0,C+a1+a2)a2newmin(C,a1+a2) \max (0, -C+a_1+a_2) \le a_2^{new} \le \min(C, a_1 + a_2)

results matching ""

    No results matching ""