Re: [R] Please help

From: Steve Lianoglou <>
Date: Mon, 04 Apr 2011 10:31:45 -0400


On Mon, Apr 4, 2011 at 5:15 AM, Sadaf Zaidi <> 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 Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info:

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 04 Apr 2011 - 14:47:11 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 Mon 04 Apr 2011 - 14:50:26 GMT.

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

list of date sections of archive