[R] How do I get the parameters out of e1071's svm?

From: Martin C. Martin <martin_at_martincmartin.com>
Date: Wed, 09 Apr 2008 14:28:26 -0400


Hi all,

I'm trying to get a simple, linear decision surface from e1071's svm. I've run it like this:

svm(as.factor(slow) ~ SLICE.3 + PSGR.7 + SOLUTIONS.6 + DR.10, y, kernel='linear', cost=1e6, class.weights=c('FALSE'=1, 'TRUE'=10))

According to the docs, kernel='linear' has a kernel u'v. Since I have 4 independent variables, I'd expect to have four coefficients plus a threshold, with 4 total degrees of freedom. But the only numeric vectors of length 4 in the result are the scaling and center, and those are done before the fitting so each one has zero mean and unit variance.

I know svms don't need to put every point through the kernel function, and can even handle infinite dimensional kernels. But don't they need to compute the coefficients?

Best,
Martin



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 09 Apr 2008 - 18:41:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Apr 2008 - 19:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive