svmtrain和fitcsvm之间的区别 [英] Differences between svmtrain and fitcsvm

查看:3686
本文介绍了svmtrain和fitcsvm之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组由35个特征组成的数据.我注意到当我将数据提供给 svmtrain 时,会收到消息:

I have a set of data composed of list of 35 features. I notice when I give the data to svmtrain I get the message:

no convergence achieved within maximum number of iterations

然后,当迭代次数< MaxIter 增加到大约1,000,000时,如果我增加数字,则上述错误消失,并且我开始使用" svmclassify "获得良好的分类.

Than, when I increase the number if iteration " MaxIter " up to around 1,000,000 the above error disappear and I start getting good classification using " svmclassify ".

另一方面,当我将数据提供给" fitcsvm "时,它会在默认的迭代次数"15,000"内迅速收敛.但是,问题是当我尝试使用"预测"对数据进行分类时,我得到了错误的分类.

On the other hand, when I give the data to " fitcsvm " it converge quickly within the default number of iteration "15,000". However, the problem is when I try to classify the data using " predict ", I got wrong classification.

因此,总而言之,在增加迭代次数之后,最后" svmtrain "可以正确地对数据进行分类.但是," fitcsvm "既没有正确地对数据进行分类,也没有给我增加迭代次数的机会,因为从检查 ConvergenceInfo.Converged 属性来看,它可以成功收敛

So in a nutshell, at last " svmtrain " classify the data correctly after increasing number of iteration. However," fitcsvm " neither classify the data correctly, nor it gives me the opportunity to increase number of iteration because it looks from checking the ConvergenceInfo.Converged property that it converge successfully.

有什么建议吗?请注意,我是Matlab和SVM的新手.

Any advice please? notice I'm new to matlab and SVM.

推荐答案

fitcsvm和svmtrain在其他算法中使用SMO进行优化.该软件在两个功能之间实现SMO的方式有所不同,但是数值研究表明,结果之间存在合理的共识.

fitcsvm and svmtrain use, among other algorithms, SMO for optimization. The software implements SMO differently between the two functions, but numerical studies show that there is sensible agreement in the results.

来源: http://in.mathworks.com/help/stats/分类vm-class.html

其中SMO是顺序最小优化.这是从训练SVM的步骤开始的一步.

Where the SMO is Sequential Minimal Optimization. This is a step from the steps of training the SVM.

显然,SMO的两个实现具有不同的参数来配置.这就是为什么在fitcsvm的实现中,您无需设置迭代次数的原因.

Apparently the two implementations of SMO have different parameters to configure. That is why in the fitcsvm's implementation, you don't get to set the number of iterations.

看看上面的链接,它也提到了其他区别.

Have a look at the link above, it also mentions the other differences.

这篇关于svmtrain和fitcsvm之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆