Hi,

I have a process using svm from the e1071 library.  it works.

I want to try using the KSVM library instead. The same data used wiht e1071 gives me an error with KSVM.

My data is a data.frame.

sample code:

svm_formula <- formula(y ~ a + B + C)

svm_model <- ksvm(formula, data=train_data, type="C-svc", kernel="rbfdot", C=1)

I get the following error:

"object is not a matrix"

So I tried this:

svm_model <- ksvm(formula, data=as.matrix(train_data), type="C-svc", kernel="rbfdot", C=1, scaled=FALSE)

Now I get this error:
"Error in model.fram.definition(data = list(v1 = c(1.1234, -2.3232:
Object is not a matrix

My data was previously scaled with the scale() function so that the mean is centered at 0. and the range is {-1,1}

Can anyone provide some suggestions as to why I'm getting an error?

Thanks!

-N

______________________________________________
R-help@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.

Reply via email to