| ²é¿´: 782 | »Ø¸´: 1 | ||
tuburfransth½ð³æ (ÕýʽдÊÖ)
|
[ÇóÖú]
¹ØÓÚÖ§³ÖÏòÁ¿»úµÄSMOË㷨α´úÂëÖÐÓÐһЩÎÊÌâÇë½Ì´ó¼Ò ÒÑÓÐ1È˲ÎÓë
|
|
CODE: target = desired output vector point = training point matrix procedure takeStep(i1,i2) if (i1 == i2) return 0 alph1 = Lagrange multiplier for i1 y1 = target[i1] E1 = SVM output on point[i1] ¨C y1 (check in error cache) s = y1*y2 Compute L, H via equations (13) and (14) if (L == H) return 0 k11 = kernel(point[i1],point[i1]) k12 = kernel(point[i1],point[i2]) k22 = kernel(point[i2],point[i2]) eta = k11+k22-2*k12 if (eta > 0) { a2 = alph2 + y2*(E1-E2)/eta if (a2 < L) a2 = L else if (a2 > H) a2 = H } else { Lobj = objective function at a2=L Hobj = objective function at a2=H if (Lobj < Hobj-eps) a2 = L else if (Lobj > Hobj+eps) a2 = H else a2 = alph2 } if (|a2-alph2| < eps*(a2+alph2+eps)) return 0 a1 = alph1+s*(alph2-a2) Update threshold to reflect change in Lagrange multipliers Update weight vector to reflect change in a1 & a2, if SVM is linear Update error cache using new Lagrange multipliers Store a1 in the alpha array Store a2 in the alpha array return 1 endprocedure procedure examineExample(i2) y2 = target[i2] alph2 = Lagrange multiplier for i2 E2 = SVM output on point[i2] ¨C y2 (check in error cache) r2 = E2*y2 if ((r2 < -tol && alph2 < C) || (r2 > tol && alph2 > 0)) { if (number of non-zero & non-C alpha > 1) { i1 = result of second choice heuristic (section 2.2) if takeStep(i1,i2) return 1 } loop over all non-zero and non-C alpha, starting at a random point { i1 = identity of current alpha if takeStep(i1,i2) return 1 } loop over all possible i1, starting at a random point { i1 = loop variable if (takeStep(i1,i2) return 1 } } return 0 endprocedure main routine: numChanged = 0; examineAll = 1; while (numChanged > 0 | examineAll) { numChanged = 0; if (examineAll) loop I over all training examples numChanged += examineExample(I) else loop I over examples where alpha is not 0 & not C numChanged += examineExample(I) if (examineAll == 1) examineAll = 0 else if (numChanged == 0) examineAll = 1 } ´úÂë¼ûÉÏ·½£¬ÎÒÏëÇë½Ì´úÂëÖеÄreturn 0ºÍreturn 1Ö´ÐкóÓÐʲô½á¹û£¿»¹ÓÐE1 = SVM output on point[i1] ¨C y1 (check in error cache)ÕâÐдúÂëÔõôÀí½â£¿ |
» ²ÂÄãϲ»¶
287Çóµ÷¼Á
ÒѾÓÐ5È˻ظ´
22408 344·Ö Çóµ÷¼Á Ò»Ö¾Ô¸ »ªµç¼ÆËã»ú¼¼Êõ
ÒѾÓÐ3È˻ظ´
289Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
317Çóµ÷¼Á
ÒѾÓÐ10È˻ظ´
¹ãÎ÷´óѧ¼ÒÇÝÒÅ´«ÓýÖÖ¿ÎÌâ×é2026Äê˶ʿÕÐÉú£¨½ÓÊÕ¼ÆËã»úרҵµ÷¼Á£©
ÒѾÓÐ3È˻ظ´
ѧУÒѾÌá½»µ½NSFC£¬»¹ÄÜÐÞ¸ÄÂð£¿
ÒѾÓÐ8È˻ظ´
08¹¤Ñ§µ÷¼Á
ÒѾÓÐ5È˻ظ´
281Çóµ÷¼Á£¨0805£©
ÒѾÓÐ25È˻ظ´
085600²ÄÁÏÓ뻯¹¤
ÒѾÓÐ6È˻ظ´
265Çóµ÷¼Á
ÒѾÓÐ8È˻ظ´
fdujian
гæ (³õÈëÎÄ̳)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 14.5
- Ìû×Ó: 2
- ÔÚÏß: 38·ÖÖÓ
- ³æºÅ: 2614328
- ×¢²á: 2013-08-24
2Â¥2015-09-02 13:07:10













»Ø¸´´ËÂ¥