5

我在 matlab 中使用 svmtrain 和MLP 内核,如下所示:

mlp=svmtrain(train_data,train_label,'Kernel_Function','mlp','showplot',true);

但我得到这个错误:

??? Error using ==> svmtrain at 470
Unable to solve the optimization problem:
Exiting: the solution is unbounded and at infinity;
the constraints are not restrictive enough.

是什么原因?我尝试了其他内核,没有任何错误。即使我尝试了svmtrain 的答案 - 无法解决优化问题如下:

options = optimset('maxiter',1000);
svmtrain(train_data,train_label,'Kernel_Function','mlp','Method','QP',...
'quadprog_opts',options);

但我又遇到了同样的错误。我的训练集是一个简单的 2 类数据点的 45*2 数据集。

4

1 回答 1

1

The solution in here doesn't really explain anything. The problem is that the Quadratic Programming method fails to converge on the optimisation problem. The normal course of action is to increase the number of iterations, but I have tested this on the same sized data, with 1,000,000 iterations, and it still fails to converge.

options = optimset('maxIter',1000000);

mlp = svmtrain(data,labels,'Kernel_Function','mlp','Method','QP',...
'quadprog_opts',options); 

??? Error using ==> svmtrain at 576
Unable to solve the optimization problem:
Exiting: the solution is unbounded and at infinity;
 the constraints are not restrictive enough.

My question is: is there any reason you are using Quadratic Programming over SMO for your optimisation? Doing exactly the same thing using SMO works fine:

mlp = svmtrain(data,labels,'Kernel_Function','mlp','Method','SMO');

mlp = 

          SupportVectors: [40x2 double]
                   Alpha: [40x1 double]
                    Bias: 0.0404
          KernelFunction: @mlp_kernel
      KernelFunctionArgs: {}
              GroupNames: [45x1 double]
    SupportVectorIndices: [40x1 double]
               ScaleData: [1x1 struct]
           FigureHandles: []
于 2013-01-23T12:50:30.823 回答