改组输入后,SVM解决方案可以更改吗? [英] Can SVM solution change after shuffling the inputs?

查看:55
本文介绍了改组输入后,SVM解决方案可以更改吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当训练支持向量机(SVM)进行完全相同的数据分类时,我会根据输入的顺序获得不同的结果,即如果我重新整理数据,则会得到不同的SVM.

When training a support vector machine (SVM) for classification with exactly the same data I obtain different results based on the order of the inputs, ie. if I shuffle the data I get different SVMs.

如果我正确地理解了理论,那么无论输入顺序如何,SVM解决方案都应该是相同的,那么我怎么得到不同的结果呢? SVM中是否有任何实现详细信息",为什么改组将改变解决方案?我已经检查了几次代码,因为我觉得这很奇怪.

If I understood the theory correctly, the SVM solution should be the same regardless of the order of the inputs, so how come I get the different results? Is there any implementation "detail" in SVM why shuffling would change the solution? I have already checked my code several times, because I think this smells.

我在OpenCV中使用SVM实现.

I use the SVM implementation in OpenCV.

编辑:在这种情况下,通过改组,我指的是更改数据点而非要素的顺序.

in this case, by shuffling I refer to changing the order of the data points not features.

推荐答案

我对OpenCV实现不熟悉.但这要做:在完全相同的数据集上进行多次试验-无需改组,相同顺序,相同数据点.查看SVM是否更改.显然,从理论上讲,不应该这样.但是可能是在实现过程中某个地方有一些小的随机化步骤,可以为相同的输入产生不同的输出.

I am not familiar with the OpenCV implementation. But do this: run several trials on exactly the same data set -- no shuffling, same order, same data points. See if the SVM changes. Obviously, in theory, it shouldn't. But it could be that there is some small randomization step somewhere in the implementation that produces different outputs for the same input.

正如克里斯·A(Chris A.)所说,特征向量经过改组后是否对应于它们的适当标签?如果没有,那显然会破坏您的结果.

As Chris A. asks, do the feature vectors correspond to their proper labels after shuffling? If not, that would obviously destroy your results.

这篇关于改组输入后,SVM解决方案可以更改吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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