Hello!! I have a vector of size "1*4006". The values are decimal numbers. These values are basically MFCC features. I want to apply multi-class SVM on it. My output will have 3 classes, that is, [0,1,2]. Someone please help me to do its code. I am n
1 view (last 30 days)
Show older comments
SHWETA KHARA
on 27 Feb 2018
Commented: Walter Roberson
on 27 Feb 2018
Hello!! I have a vector of size "1*4006". The values are decimal numbers. These values are basically MFCC features. I want to apply multi-class SVM on it. My output will have 3 classes, that is, [0,1,2]. Someone please help me to do its code. I am new in this field. I have tried svmtrain function but i am not able to give input parameters properly.
thanks in advance
0 Comments
Accepted Answer
Walter Roberson
on 27 Feb 2018
As discussed in https://www.mathworks.com/matlabcentral/answers/385076-hi-i-am-using-2017a-matlab-i-am-not-able-to-use-libsvm-on-it-the-image-shows-the-error-should#comment_540038 svm cannot be meaningfully used when you do not know which class each sample belongs to.
... Unless, that is, you want to investigate techniques such as https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2099486/ which you would probably have to write your own code for.
2 Comments
Walter Roberson
on 27 Feb 2018
As discussed in https://www.mathworks.com/matlabcentral/answers/385076-hi-i-am-using-2017a-matlab-i-am-not-able-to-use-libsvm-on-it-the-image-shows-the-error-should#comment_540133, the tool you are using expects that one of the columns contains the output that is appropriate for that that input row -- expects that one of the columns will contain 0, 1, 2, or 3 for that row. You would mark that one row as Response and leave the other rows as Predictor.
If you have a separate variable that contains the class then build a new matrix of the samples concatenated with the known targets and tell the tool you are using which column of the combined matrix contains the targets.
More Answers (0)
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!