I wasn't sure if anyone had run into an instance when they needed to know the distance from a point to the hyperplane. In the FAQ for for LibSVM they write the following:
Q: How do I get the distance between a point and the hyperplane?
The distance is |decision_value| / |w|. We have |w|2 = wTw = alphaT Q alpha = 2*(dual_obj + sum alpha_i). Thus in svm.cpp please find the place where we calculate the dual objective value (i.e., the subroutine Solve()) and add a statement to print wTw.
My issue is, I'm using MATLAB. And so I have no idea how to alter the C files and then recompile, or whatever, to use in MATLAB. Wasn't sure if anyone has overcome this issue...Thanks!
[link][comment]