What does this error mean? I thought the argument was double
2 views (last 30 days)
Show older comments
>> svmStruct = svmtrain(m,groups,'ShowPlot',true);
Undefined function 'svmtrain' for input arguments of type 'double'.
6 Comments
Geoff Hayes
on 7 May 2014
Habibu - I get the same error (as the above) since I don't have the Statistics Toolbox. As the cyclist asks below, what does which svmtrain return?
Answers (2)
the cyclist
on 7 May 2014
The code you posted in the comment worked without error for me.
What do you get if you type
which svmtrain
?
4 Comments
the cyclist
on 7 May 2014
I'm guessing that that is the answer. On my machine (a Mac), it is
/Applications/MATLAB_R2014a.app/toolbox/stats/stats/svmtrain.m
From peeking at this page of old Release notes, it looks to me that SVM was introduced into the Statistics Toolbox in version 2013a (and was formerly in the Bioinformatics Toolbox).
Nguyen Duc Duy
on 3 Sep 2019
Maybe you need to change the function.
Machine Learning
svmtrain and svmclassify have been removed
The svmtrain and svmclassify functions have been removed. Use the fitcsvm function and the predict function of ClassificationSVM instead.
To update your code, replace all instances of svmtrain with fitcsvm, and replace all instances of svmclassify with predict. For more details, see the Compatibility Considerations sections of svmtrain and svmclassify.
1 Comment
See Also
Categories
Find more on Introduction to Installation and Licensing 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!