variable importance for support vector machine and navies Bayes classifiers in R
1
1
Entering edit mode
8.0 years ago

Hi all,

I’m working on building predictive classifiers in R on cancer dataset. I’m using random forest, support vector machine and navies Bayes classifiers. I’m unable to calculate variable importance on SVM and NB models

I end up receiving the subsequent error.

Error in UseMethod("varImp") : 
no applicable method for 'varImp' applied to an object of class "c('svm.formula', 'svm')"

I would greatly appreciate it if anyone could help me.

Thanks in advance.

machine learning R svm navies Bayes • 6.8k views
ADD COMMENT
3
Entering edit mode
8.0 years ago

It looks like you're using the caret package which has no implementation of varImp for SVM. As far as I know, caret can give variable importance only for algorithms that can do feature selection and the standard 2-norm SVM is not one of them. The only package that I know does feature selection for SVM is the package penalizedSVM. With the 1-norm SVM, the weights reflect the importance of the features.

ADD COMMENT

Login before adding your answer.

Traffic: 1928 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6