[R] Please help

Steve Lianoglou mailinglist.honeypot at gmail.com
Mon Apr 4 16:31:45 CEST 2011


Hi,

On Mon, Apr 4, 2011 at 5:15 AM, Sadaf Zaidi <s.zaidi.ke at amu.ac.in> wrote:
> Dear Sir/Madam,
> I am stuck with a nagging problem in using R for SVM regression. My data has 5
> dimensions and 400 observations. The independent variables are :
> Peb, Ksub, Sub, and Xtt.
> The dependent variable is: Rexp.
> I tried using the svm.tune function to tune the hyper parameters: gamma, epsilon and C.
> I am getting the following error message:
> Error in predict.svm(ret, xhold, decision.values+TRUE): Model is empty!
> May you please help me!

You're not giving us much to go on, can you show us the code that you
are using that gets you into this problem?

(i) For example -- by "svm.tune", do you mean the "tune" function from
the e1071 package?

(ii) What is the exact function call you are using that gives you this error.

(iii) Can you build a "normal" svm model without "tuning" it. For
instance, does svm(x,y,..) work with your data?

(iv) Are you sure that the values you are inputting to the svm (and/or
tune function) are of the correct type?

With your follow up email that provides the code you tried and answers
to some of the Q's above. Also provide a small bit of your data that
we can use to help you debug. You can easily do so by using the `dput`
function. Say your data (predictors and label) are in a variable `x`,
paste the output of the following command in your follow up email:

R> dput(x[sample(nrow(x), 10),])

This will give us 10 random rows from your data that people trying to
help you can use.

-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