LibSVM High-Dimension Training Matrix
3 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!