Re: [R] Need help for SVM code for microarray classification

From: Aadhithya <>
Date: Tue, 29 Jun 2010 16:54:12 -0700 (PDT)

Hello Steve
   Thanks for quick responses its really helping me out .Ya I made the necessary changes you had mentioned. I was not sure of that 'type' argument where u had told me to set it to SVM . Do you mean I have to give that argument in this line "cl <- c(c(rep("ALL",10), rep("AML",10)));" and when I ran the code the following output I had got : result:
pred  ALL AML
  ALL   7   5
  AML   3   5
Does this mean that 7 samples of ALL from test file has been classified as ALL and 5 samples of ALL are classified as AML and so on or is there any other way we can interpret this result . I had done one more thing I had taken the transpose of both my test and train files as given below: model<- svm(t(train),cl);
pred <- predict(model,t(test));
And the result I had got is :
pred   ALL     AML
  ALL   10       0
  AML   0       10 why is there a difference in the result which I had given in the before post?does this mean doing transpose classifies the samples better? or is there any reason for this?
I am sorry I am troubling you a lot  but seriously its a very timely help I am really thankful to you.


View this message in context: Sent from the R help mailing list archive at mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 30 Jun 2010 - 02:23:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Jun 2010 - 02:30:42 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive