[R] cross validation in rvm not working? (kernlab package)

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Feb 14 17:51:16 CET 2012

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:
> 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)
> ______________________________________________
> R-help at 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.

More information about the R-help mailing list