[R] SVM

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Sep 17 17:36:52 CEST 2009


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




More information about the R-help mailing list