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

2010-06-29 Thread Aadhithya
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)));" a

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

2010-06-29 Thread Steve Lianoglou
> 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

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

2010-06-29 Thread Aadhithya
Hi Steve 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 : Result: pred ALL AML ALL 10 0 AML 0 10 why is there a difference in th

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

2010-06-29 Thread Aadhithya
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)));" a

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

2010-06-29 Thread Steve Lianoglou
Hi, On Tue, Jun 29, 2010 at 7:16 AM, Aadhithya wrote: > > Following is the error I am getting: > Error in svm.default(train, cl) : >  Need numeric dependent variable for regression. Here's a problem that you may not even know you had yet. By the looks of your code, it seems as if you want to do

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

2010-06-29 Thread Aadhithya
Following is the error I am getting: Error in svm.default(train, cl) : Need numeric dependent variable for regression. My dataset looks like this in both training and testing: ALL ALL ALL ALL ALL ALL ALL ALL ALL ALL AML AML AML AML AML

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

2010-06-28 Thread Steve Lianoglou
Hi, On Mon, Jun 28, 2010 at 9:55 PM, Aadhithya wrote: > > Hi I am Aadhithya I am trying to write a code to classify microarray data > (AML and ALL) using SVM in R > my code goes like this : > library(e1071) > train<-read.table("Z:/Documents/train.txt",header=T); > test<-read.table("Z:/Documents/t

[R] Need help for SVM code for microarray classification

2010-06-28 Thread Aadhithya
Hi I am Aadhithya I am trying to write a code to classify microarray data (AML and ALL) using SVM in R my code goes like this : library(e1071) train<-read.table("Z:/Documents/train.txt",header=T); test<-read.table("Z:/Documents/test.txt",header=T); cl <- c(c(rep("ALL",10), rep("AML",10))); model<