Displaying 1 result from an estimated 1 matches for "scorrcoeff".
Did you mean:
corrcoeff
2003 Nov 03
1
svm in e1071 package: polynomial vs linear kernel
...gamma = 1/(dim(data)-1), degree = 3) {
mse <- 0; r2 <- 0
for (n in 1:ntry) {
svm.model <- svm(formula , data = data, scale = scale, kernel =
kernel,
cross = cross)
mse <- mse + svm.model$tot.MSE
r2 <- r2 + svm.model$scorrcoeff
}
mse <- mse/ntry; r2 <- r2/ntry; result <- c(mse, r2)
cat(sprintf("cv.svm> mse, r2 = %5.3f %5.3f\n", mse, r2))
return (result)
}
# define data set
x1 <- rnorm(9); x2 <- rnorm(9)
df <- data.frame(y = 2*x1 + x2, x1, x2)
# invoke cv.svm() for linear and...