This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: E2 = SVM output on point [i2]  y2 (check in error cache) r2 = E2*y2 if ((r2 < tol && alph2 < C)  (r2 > tol && alph2 > 0)) { if (number of nonzero & nonC alpha > 1) { i1 = result of second choice heuristic if takeStep(i1,i2) return 1 } loop over nonzero and nonC alpha, starting at 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: initialize alpha array to all zero initialize threshold to zero 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 }...
View
Full Document
 Spring '11
 ProfBhattacharya

Click to edit the document details