How to train an SVM classifier and calculate performance
5 次查看(过去 30 天)
显示 更早的评论
Hi all,
I was already browsing through some similar question, but I still don't understand completely how to train an SVM classifier with matlab and afterwards calculate performance measures like AUC, Accuracy asf.
I managed to use fitcsvm to train a classifier and using leave-one-out cross-validation:
model=fitcsvm(data,groups,'Standardize',true,'ClassNames',{'group1','group2'},'Leaveout','on')
This works well, but how to calculate performance measures of my classifier after this step and plot the results?
0 个评论
回答(2 个)
Swarooph
2016-8-1
You could do one of several things:
3. Performance evaluation using perfcurve -- (Another link - Evaluate Classifier Performance Using perfcurve)
2 个评论
Swarooph
2016-8-2
If you look at the examples in the documentation, it seems to be using fitPosterior followed by resubPredict function.
Samaneh Nemati
2019-12-2
you need to pass the output of svm classification (model) to predict function to get "label" and "scores".
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!