How do I get the distance between the point and the hyperplane in MATLAB 2021a fitcsvm?
조회 수: 6 (최근 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!