Hello,

In the attached file training.csv (I apologize for the large file) I
have 238 objects belonging to 13 classes, which are described by 183
properties. I would like to find a svm model for these objects.

I tried the following R statements.

library('e1071')
datatraining <- read.csv("training.csv",head=TRUE)

names<-names(datatraining)
print("before print(names)");                 print(names)
# There are 186 names, respectively 184 properties P3, P4 ... P1549

data <- subset(datatraining,select=c(-dataname_gen_spec,-Gen))
classes <- subset(datatraining,select=Gen)
#  There are 13 classes

model <- svm(data,classes,type='C-classification',kernel='linear')
print(sprintf("There are %d support vectors",model$tot.nSV));
#  There are 176 support vectors

print("before summary(model)");              summary(model)
$index);
print("before print(model$index)");          print(model$index);


I expect that the index values are between 1 and 184, because there are
84 properties, but I get several indices larger than 200.  What did I
misunderstood?

Any hint is very appreciated.

Regards Juergen



______________________________________________
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