sample data within margin of SVM
Mostrar comentarios más antiguos
Hi, I am using fitcsvm & predict to train and test the classification data. Somehow, I need to find the number of samples within SVM margins so that a classification error can be estimated using the samples within the margin in terms of the total number of samples. I tried the option of "score" but I am not sure of the physical meaning of the score. Can anyone help me to count the samples within the margins?
Thanks in advance.
Respuestas (2)
Stephan
el 22 de Jun. de 2018
Hi,
For calculation of the accuracy you could calculate the error from your crossvalidated model using
crossval
command at first and then calculate the error in form using the
kfoldloss
command. This gives you the error from your test set for your model which should mean:
accuracy = 1 - kfoldloss
These steps are shown with examples on the fitcsvm documentation site at the section Train and Cross-Validate SVM Classifier.
Best regards
Stephan
Tough Guy
el 24 de Jun. de 2018
0 votos
Categorías
Más información sobre Classification Trees en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!