Question: variable importance for support vector machine and navies Bayes classifiers in R
1
gravatar for kavya.krishnamurthy284
4.6 years ago by
Bangalore
kavya.krishnamurthy28410 wrote:

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.

ADD COMMENTlink modified 4.6 years ago by Jean-Karim Heriche23k • written 4.6 years ago by kavya.krishnamurthy28410
3
gravatar for Jean-Karim Heriche
4.6 years ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche23k wrote:

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 COMMENTlink written 4.6 years ago by Jean-Karim Heriche23k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1236 users visited in the last hour