[R] SVM coefficients

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Sep 1 16:22:27 CEST 2009

Hi Marlene,

I'm going to cut out much of your post and just cut to the chase:

On Sep 1, 2009, at 9:03 AM, marlene marchena wrote:

> Looking only to prediction purpose the scale model is good but I’m  
> mainly
> interested in w. Is it possible to improve this model to get lower  
> values to
> w? Actually I’m trying to run the SVM-GARCH and one condition to the  
> model
> is that the sum of
> w’s <1 (in my model I have only two independent variables).
> If you have any idea how to improve the model or if you find any  
> problem
> with it please let me now.

In principle you should be able to do what you're after (of  
course :-), but I'm pretty sure you won't  be able to do this using  
the e1071 package since you're imposing a linear constraint on w (this  
is almost like an l1 w/o using absolute vals of w's components, no?),  
while e1071::svm is solving a convex constraint (l2 on w).

You say you're "mainly interested in w," so are you looking for a  
means of doing feature selection? You can stick with e1071 and try  
doing recursive feature elimination (google it, you'll find mucho (aka  
SVM RFE)), or you can rig up an l1-svm which is already implemented  
for you in the penalized svm package (haven't used it myself):

cran: http://cran.r-project.org/web/packages/penalizedSVM/index.html
publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/25/13/1711

Does that help?


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