[R] SVM model_combination of different vairables issues

yadav ysapkota at ualberta.ca
Fri Sep 16 22:00:21 CEST 2011


I am trying to build a classifier using SVM and I have 23 independent
variables and 1 response.

I want to check the classification ac curacies of each independent
variables. I did this without any problem.

Now, I want to check the all possible combinations for any two variables
using following script:


> data=read.csv('Relapse_recoded.csv', header=TRUE, sep=',');
> y=data[,2];
> library(e1071);
> for (i in 3:25){
+ j=i+1
+ model=svm(y,data[,c(i,j)], type='C', kernel='linear', cross=110)
+ m=summary(model)
+ print(i)
+ print(j)
+ print(m)
+ }

*Error in scale(newdata[, object$scaled, drop = FALSE], center =
object$x.scale$"scaled:center",  : 
  (subscript) logical subscript too long*

Does anyone know why is this error message??

Thank you in advance

Yadav
PhD student



--
View this message in context: http://r.789695.n4.nabble.com/SVM-model-combination-of-different-vairables-issues-tp3819015p3819015.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list