我如何在 Matlab 中训练 SVM,超过 2 类

How can I train SVM in Matlab, with more than 2 classes

我正在尝试使用 fitcsvm 来训练和分类我的数据。但是,我注意到 - 如果我错了请纠正我 - fitcsvm 只能与 2 类(组)一起使用。

我的数据有2个以上类。有没有办法在matlab中对它们进行分类?

我用谷歌搜索了一下,我读到有人建议使用 fitcecoc, while others recommend to use out of the box code multisvm

此外,其他推荐使用discriminant analysis

请告知最佳路线。

你是对的,fitcsvm是一个或两个类,你可以使用svmtrain,它是matlab的 svm classifier for more then two 类,还有一个著名的工具箱libsvm,如果你google会发现容易地。

https://github.com/cjlin1/libsvm

最近看到一些新的乘法svm分类器的方法叫DSVM,很不错的新方法,可以在matlab的文件交换中找到。

http://www.mathworks.com/matlabcentral/fileexchange/48632-multiclass-svm-classifier

祝你好运