Skip to content

interpretation of svm models with the e1071 package

6 messages · manuel.martin, Noah Silverman, Steve Lianoglou

#
Dear all,

after having calibrated a svm model through the svm() command of the 
e1071 package, is there a way to
i) represent the modeled relationships between the y and X variables 
(response variable vs. predictors)?
ii) rank the influence of the predictors used in the model?

Right now I am more interested in regression models, but I guess this 
would be useful for classification too.

Thank you in advance,      manuel
#
Hi,

On Fri, Jul 9, 2010 at 12:15 PM, manuel.martin
<manuel.martin at orleans.inra.fr> wrote:
Can you explain a bit more ... how do you want them represented?
One technique that's often/sometimes used is to calculate the SVM's W
vector by using the support vectors along with their learned
weights/alphas.

This comes up every now and again. Here's an older post explaining how
you might do that with the svm model from e1071:

http://article.gmane.org/gmane.comp.lang.r.general/158272/match=w+b+vector+svr

Hope that helps.
#
Steve,

Couldn't he also just use the decision.value property to see the 
equivilent of t(x) %*% b for each row?

-N
On 7/9/10 7:11 PM, Steve Lianoglou wrote:
2 days later
#
Thanks a lot for the reply, some comments below
On 07/10/2010 04:11 AM, Steve Lianoglou wrote:
I was thinking to a simple ? = fi(Xi) plot, fi resulting from the fitted 
svm model. Xi is the predictor, among the whole set of predictors, X, 
one wish to see the relationship with the response.
For boosted regression trees, which I am more familiar with, this is fi 
function is estimated by averaging the effects of all predictors but Xi, 
and plotting how ? varies as Xi does.

Hope this is a bit clearer, Manuel

  
    
1 day later
#
Hi,

On Sat, Jul 10, 2010 at 12:35 AM, Noah Silverman
<noah at smartmediacorp.com> wrote:
I don't follow what you're saying. What is this the equivalent of?

What's b here? The bias/offset?
#
Hi,

On Mon, Jul 12, 2010 at 4:55 AM, manuel.martin
<manuel.martin at orleans.inra.fr> wrote:
<snip>
I still think you might be able to get some mileage out of calculating
your W vector and looking at the values in each of its
coordinates/bins.

I think one problem trying to figure out something for the plot you
are after is that I feel like depending on the choice of kernel used
in for your SVM, rigging up such an fi(Xi) plot might not be as
straight forward as you might think, since kernels can manipulate your
feature space in fun ways.

There's some literature out there about how to extract
meaning/features from an SVM model. Perhaps you can search through
some of that to help get some ideas.