LibSVM High-Dimension Training Matrix

2 次查看(过去 30 天)
Hamza
Hamza 2023-8-17
回答: Drew 2023-8-22
Hello everyone, I am trying to use the svmtrain function from Libsvm for 7-class multiclass classification. I have a train matrix with about 60,000 samples and 39 features. When I execute the model = svmtrain(ClassLabel, train_matrix), MATLAB crashes. Is there any way to solve this issue or another way to apply the SVM method?
Thanks in advance!

回答(1 个)

Drew
Drew 2023-8-22
You indicate that you have a 7-class multiclass classification problem, and you want to use SVM classifiers, so use https://www.mathworks.com/help/stats/fitcecoc.html to train the SVM classifiers: "Mdl = fitcecoc(Tbl,ResponseVarName) returns a full, trained, multiclass, error-correcting output codes (ECOC) model using the predictors in table Tbl and the class labels in Tbl.ResponseVarName. fitcecoc uses K(K – 1)/2 binary support vector machine (SVM) models using the one-versus-one coding design, where K is the number of unique class labels (levels). Mdl is a ClassificationECOC model." There are many options in fitcecoc to control things like the coding design, the details of the binary learners, etc.
Background: svmtrain has been removed from MATLAB, it is replaced with fitcsvm for binary SVM classification: https://www.mathworks.com/help/releases/R2018b/stats/svmtrain.html. Furthermore, fitcecoc makes it convenient to train many binary classifiers (such as SVMs) to solve a multiclass classification problem, such as the one you mention.

类别

Help CenterFile Exchange 中查找有关 Classification Ensembles 的更多信息

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by