How do I get the distance between the point and the hyperplane in MATLAB 2021a fitcsvm?
7 次查看(过去 30 天)
显示 更早的评论
Hi all,
Nested cross-validation method gives me the best model 1x1 ClassificationSVM, please see attached. This models gives an accuracy of 94.53% (using crossval).
I was wondering if there is an easy way to calculate the distance between the point and the hyperplane from this output?
Thanks,
Sahil
0 个评论
回答(1 个)
Kshitij Chhabra
2021-10-13
Hi Sahil,
From my understanding you are trying to find the distance of a particular data point from the hyperplane. I can recommmend you using the the "predict" function to get the Classification Score which is the signed distance of a point x form the decision boundary and ranges from -∞ to +∞.
Hope this helps!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classification Trees 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!