1
$\begingroup$

I'm training a SVM classifier on a dataset using LibSVM through Weka, but after I have my trained classifier I'd like to know which features are important to my classifier and which features don't have much use.

Currently a pretty mediocre way I'm doing this is running supervised attribute selection in Weka using the Ranker search and some search method (not sure which one would be best, currently using CorrelationAttributeEval), but this isn't specific to my model, it's just stating how well correlated my features are to my classification attribute.

I'm not that familiar with SVM, but I'm aware that the trained classifier has some weight values for each attribute. Could I rank attributes by the absolute value of their weights and it'd tell me how well those attributes predict the classification attribute? If that's a valid method, is anyone also familiar with how I could do that (code wise) using LibSVM in Weka?

Thanks.

$\endgroup$

1 Answer 1

2
$\begingroup$

In general, there is no way to tell the predictive power of individual features from a SVM. The reason is that the classification function learned by SVM often cannot be decomposed into individual features meaningfully.

However, in the special case of a linear SVM (linear kernel), you can interpret the weights as a feature importance as explained here.

You can also read about feature selection here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.