[R] e1071::SVM calculate distance to separating hyperplane

From: David Meyer <david.meyer_at_wu-wien.ac.at>
Date: Thu 29 Dec 2005 - 11:54:42 EST

predict.svm() can give you the decision values which are the distances you are looking for (up to a scaling constant).

Regards,
David

>Hi,
>I know this question has been posed before, but I didnt find the answer in
>the R-help archive, so please accept my sincere apologies for being
>repetitive:
>How can one (elegantly) calculate the distance between data points (in the
>transformed space, I suppose) and the hyperplane that separates the 2
>categories when using svm() from the e1071 library?

>thanks a lot,
>Hans

-- 
Dr. David Meyer
Department of Information Systems and Operations

Vienna University of Economics and Business Administration
Augasse 2-6, A-1090 Wien, Austria, Europe
Fax: +43-1-313 36x746 
Tel: +43-1-313 36x4393
HP:  http://wi.wu-wien.ac.at/~meyer/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jan 06 01:42:42 2006

This archive was generated by hypermail 2.1.8 : Fri 06 Jan 2006 - 06:04:05 EST