What is the predicted score and how can I use it for the distance of the datapoint to the hyperplane?
1 view (last 30 days)
Show older comments
I am coding a support vector machine. When I try this code
[label,score] = predict(Model,X_test_best_feature);
then I get something like this i.e. two columns for the score which confuses me.
table(y_test, label, score)
y_test label score
______ _____ ____________________
2 2 -0.99984 0.99984
2 2 -0.99956 0.99956
2 2 -0.99983 0.99983
2 2 -0.99956 0.99956
2 2 -0.99969 0.99969
And how can I use the score to compute the distance of each datapoint to the hyperplane?
1 Comment
Krishna Bindumadhavan
on 9 Jul 2018
Did you already have a look at the documentation here: https://www.mathworks.com/help/stats/compactclassificationsvm.predict.html#d119e588869 ?
There is information regarding score both at "Output arguments" and at the end under "More About".
Specifically, the first column contains negative class scores and the second column contains positive class scores.
Answers (0)
See Also
Categories
Find more on Get Started with 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!