You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Natalia Connolly <na...@gmail.com> on 2015/03/13 19:35:40 UTC

Any way to find out feature importance in Spark SVM?

Hello,

    While running an SVMClassifier in spark, is there any way to print out
the most important features the model selected?  I see there's a way to
print out the weights but I am not sure how to associate them with the
input features, by name or in any other way.  Any help would be appreciated.

    I am using spark 1.2.1 and my code is in Java.

    Thanks!

    Natalia

Re: Any way to find out feature importance in Spark SVM?

Posted by Xiangrui Meng <me...@gmail.com>.
You can compute the standard deviations of the training data using
Statistics.colStats and then compare them with model coefficients to
compute feature importance. -Xiangrui

On Fri, Mar 13, 2015 at 11:35 AM, Natalia Connolly
<na...@gmail.com> wrote:
> Hello,
>
>     While running an SVMClassifier in spark, is there any way to print out
> the most important features the model selected?  I see there's a way to
> print out the weights but I am not sure how to associate them with the input
> features, by name or in any other way.  Any help would be appreciated.
>
>     I am using spark 1.2.1 and my code is in Java.
>
>     Thanks!
>
>     Natalia
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org