在使用Matlab自带函数svmtrain进行训练二维分类器时,得到了如下的错误提示:
Unable to solve the optimization problem: Maximum number of iterations exceeded; increase options.MaxIter. To continue solving the problem with the current solution as the starting point, set x0 = x before calling quadprog.
意思就是:在默认的最大爹地次数中,不能拟合数据。
我查了一下文档发现有默认迭代次数默认的最大值是15000次,个人感觉这个次数能够应付绝大多数情况,如果到了这个次数还没有得到结果,建议还是在训练样本的选择上下点功夫吧。一个好的样本,即使数据量有一万,用SVM训练也不过几秒钟;相反,如果数据交叉错综复杂,即使500个数据也会计算很久也得不到结果。原话如下: