Hi, If I do a standard svm regression with e1071
x <- seq(0.1, 5, by = 0.05) y <- log(x) + rnorm(x, sd = 0.2) m <- svm(x, y) we can do predict(m,x) to get the fitted values. But what if I wan tho get them by hand? Seem to me like it should be w = t(m$coefs)%*%m$SV x.scaled = scale(x, m$x.scale[[1]], m$x.scale[[2]]) t(w %*% t(as.matrix(x.scaled))) - m$rho but this is wrong If i get this right what the answer should be is f(x) = w%*%phi(x)+b but the question is what exactly is phi (by default) and how do you do this if you cannot get phi in closer form (rbf kernel?). It seems like the answer would lie with the dual representation of the above, i think it is f(x) = sum_{support vectors}{(a_i-a*^{*}_{i})K(x_{i},x)}+b but how do you get the a variables everything else. An actual formula would be greatly appreciated! Thanks! -Andrei [[alternative HTML version deleted]] ______________________________________________ R-help@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.