[R] how to get the signed distance in SVM?

Qing Li shunqinature at gmail.com
Sat Jan 10 23:36:50 CET 2009


Dear all,

In the svm() function in the package e1071, is there anyway to get the 
signed distance of a sample point to the separating hyperplane in the 
feature space? Namely, if the separating hyperplane is given by f(x) = 
h(x)^T * w - rho, is there any way to get f(x)?

Also, in the returned values of the function svm(), what does "$coefs" 
mean? It is said to be the "corresponding coefficients times the 
training labels", but I don't know what is that "corresponding 
coefficients" denoting?

Thank you very much!

Best,
Qing




More information about the R-help mailing list