[R] How do I get the parameters out of e1071's svm?
Martin C. Martin
martin at martincmartin.com
Wed Apr 9 20:28:26 CEST 2008
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
More information about the R-help
mailing list