Is there any way to calculate variable importance in R for SVM regression and averaged neural networks?
I've been using caret package, that has varImp function in it
> m <- best.tune(svm, train.x = descr[rownames(tr[[i]]),2:ncol(descr)], train.y = tr[[i]][,1], data = df, cost = 2^(seq(0,10,5))), tunecontrol = tune.control(sampling = "cross")) > varImp(m) Error in UseMethod("varImp") : no applicable method for 'varImp' applied to an object of class "svm"
According to the developer, this approach wasn't realized for SVM method
However, rminer package suggests such function as Importance. Though, it throws an error:
VariableImportance = Importance(svmFit, data=descr[rownames(tr[[i]]), 2:ncol(descr)], method="1D-SA") Error in Importance(svmFit, data = descr[rownames(tr[[i]]), 2:ncol(descr)], : duplicate 'switch' defaults: 'lm == func...' and 'NULL'