Solved – Is it possible to extract feature importances from a KNN model

For tree-based models, I've used varImp in caret to extract feature importances; however, this doesn't work with KNN. Can someone explain why this is/if this is possible? Thanks!

I don't know of a canned command, but you could always measure how much the mean-squared error (or misclassification rate) increases when a variable is either removed or permuted.

Similar Posts:

Rate this post

Leave a Comment