MATLAB: SVM – SVMTRAIN method SMO (error: No convergence achieved within maximum number of iterations)

maxiter;smosvmsvmtrain

Hello, I am using the method SMO for SVMTRAIN. When training the svm, the parameter MaxIter (set in default at 15000) is used to control the time needed to get convergence.
If convergence not reached before iteration number [MaxIter] then an error is lauched and svmtrain function stops.
the error lauched displays (error: No convergence achieved within maximum number of iterations).
I increased the parameter MaxIter to 100000 (=10^5) but still svmtrain crashes.
*HOW CAN I HANDLE THIS ERROR? INCREASING THE PARAMETER TO INFINITY IS IT A GOOD SOLUTION ?
BY REDUCING THE SAMPLE SIZE, IS IT GOING TO DECREASE THE COMPLEXITY OF THE CLASSIFICATION PROBLEM, AND HELP IT TO ACHIEVE CONVERGENCE FASTER ?*
thank you guys !

Best Answer

You can do 3 things:
  1. Lower the box constraint.
  2. Increase tolkkt.
  3. Set kktviolationlevel to a positive value.
Any of these things should speed up convergence.
You can set MaxIter to Inf, but then be ready to spend a long time waiting till SMO converges.