Skip to content
Back to formatted view

Raw Message

Message-ID: <65D866C7-471D-4047-8426-950F1E28EE76@googlemail.com>
Date: 2012-02-14T11:42:41Z
From: Martin Batholdy
Subject: cross validation in rvm not working? (kernlab package)

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)