Skip to content

cross validation in rvm not working? (kernlab package)

2 messages · Martin Batholdy, Uwe Ligges

#
Hi,

according to ?rvm the relevance vector machine function as implemented in the kernlab-package 
has an argument 'cross' with which you can perform k-fold cross validation.

However, when I try to add a 10-fold cross validation I get the following error message:

Error in match.arg(type, c("C-svc", "nu-svc", "kbb-svc", "spoc-svc", "C-bsvc",  : 
  'arg' should be one of ?C-svc?, ?nu-svc?, ?kbb-svc?, ?spoc-svc?, ?C-bsvc?, ?one-svc?, ?eps-svr?, ?eps-bsvr?, ?nu-svr?


code-example:

# create data
x <- seq(-20,20,0.1)
y <- sin(x)/x + rnorm(401,sd=0.05)

# train relevance vector machine
foo <- rvm(x, y, cross=10)


So, does that mean that cross-validation is not working for rvm at the moment?
(since the type argument only allows support vector regression or classification)
#
Please report bugs in packages to the corresponding package maintainer 
(perhaps suggesting a fix if you have an idea how to do that).

Uwe Ligges
On 14.02.2012 12:42, Martin Batholdy wrote: