I'm using the libSVM for .net. After running the SVM training i get a vector of alphas. As i understand, the margin is the minimum distance between any point and the decision hyperplane.
I'm not sure how to do that using the alphas.
Thanks.
I'm using the libSVM for .net. After running the SVM training i get a vector of alphas. As i understand, the margin is the minimum distance between any point and the decision hyperplane.
I'm not sure how to do that using the alphas.
Thanks.
Q: How do I get the distance between a point and the hyperplane?
The distance is |decision_value| / |w|. We have |w|^2 = w^Tw = alpha^T 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 w^Tw.