Svmtrain - unable to solve optimization problem

I use svmtrain to distinguish several data pairs. Although svmtrain works as desired in one case (it produces a classifier object with an accuracy of ~ 70%, as verified by svmclassify), all other cases seem to fail. My function vectors are 134 dimensions, and I use 300 to 800 data points for each class. (Each class does not have to have the same number of data points). I tried using the default kernel for svmtrain using the method

SVM = svmtrain(double(train{k}), group_train{k},'showplot',true); 

In this case, I get the error:

It is impossible to solve the optimization problem: the maximum number of iterations is exceeded; increase the parameters. Max. To continue solving the problem with the current solution as a starting point, set x0 = x before calling quadprog.

I also tried to expand the number of iterations and specify the kernel with a call:

 options = optimset('maxiter',1000,'largescale','on'); SVM = svmtrain(double(train{k}),group_train{k},'Kernel_Function','mlp','Method','QP',... 'quadprog_opts',options); 

In this case, I get the error:

It is impossible to solve the optimization problem: Output: the solution is unlimited and infinite; restrictions are not restrictive enough.

In the event that it really worked, I have 338 data points from the first class and 476 data points from the second class. As an example, in three cases that do not work, the second class has 828, 573, and 333 data, while the first class remains the same and has 338 data points. None of the method calls work.

could you help me? I tried to solve this problem for a week and no luck. I am using MATLAB 7.9.0 R2009B on a Windows XP virtual machine with a 1 GHz processor and 2 GB of RAM.

Thank you very much! -Vivek

+2
source share
1 answer

Do it like this:

 options = optimset('maxiter',1000); svmtrain(TotalResult,YResultsTotal,'Kernel_Function','mlp','Method','QP',... 'quadprog_opts',options); 
+4
source

All Articles