Skip to content

crossvalidation in svm regression in e1071 gives incorre ct results (PR#8554)

1 message · Liaw, Andy

#
1. This is _not_ a bug in R itself.  Please don't use R's bug reporting
system for contributed packages.

2. This is _not_ a bug in svm() in `e1071'.  I believe you forgot to take
sqrt.

3.  You really should use the `tot.MSE' component rather than the mean of
the `MSE' component, but this is only a very small difference.

So, instead of spread[i] <- mean(mysvm$MSE), you should have spread[i] <-
sqrt(mysvm$tot.MSE).  I get:
+     spread[i] <- svm(y ~ x,data, cross=10)$tot.MSE
+ }
Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.2679  0.2679  0.2679  0.2679  0.2679  0.2679 


Andy 

From: no228 at cam.ac.uk