Hello, I have 12 sample each sample has got 1000 observation, i.e I have a matrix X with 1000 rows and 12 columns! m <- svm(t(X)) p <- predict (m) Can anyone tell me how to use svmtrain() in R! Many Yhanks, Samuel [[alternative HTML version deleted]]
Hi, On Sep 17, 2009, at 7:39 AM, Samuel Okoye wrote:> Hello, > > I have 12 sample each sample has got 1000 observation, i.e I have a > matrix X with 1000 rows and 12 columns! > > m <- svm(t(X)) > p <- predict (m) > > Can anyone tell me how to use svmtrain() in R!I guess you're using the svm in the e1071 package? What's svmtrain? The call to "svm" trains the svm. The call to predict uses it on new data, but you need to give it new data to predict on. You have: p <- predict(m) What exactly do you want your model to do? Predict on what? Please see the code in the Examples section of ?svm .. it's pretty straight forward. Let us know what problems you're having understanding those examples and we can try to offer some insight. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
read Support Vector Machines in R http://www.jstatsoft.org/v15/i09/paper On Thu, Sep 17, 2009 at 4:39 AM, Samuel Okoye <samuoko at yahoo.com> wrote:> Hello, > > I have 12 sample each sample has got 1000 observation, i.e I have a matrix X with 1000 rows and 12 columns! > > m <- svm(t(X)) > p <- predict (m) > > Can anyone tell me how to use svmtrain() in R! > > Many Yhanks, > Samuel > > > > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >