Josh Zhang
Josh Zhang

Reputation: 79

SVM Feature Selection in R

I am training a SVM classifier. Right now, I have about 4000 features, but a lot of them are redundant/uninformative. I want to reduce the features in the model to about maybe 20-50. I would like to use greedy hill climbing, reducing the features by 1 each time. The removed feature should be the least important feature. After training an SVM, how do I get the ranking of the importance of the features? If I am using libsvm in R, how do I get the weight of each feature, or some other similar type of indicator of importance? Thanks!

Upvotes: 4

Views: 3564

Answers (1)

Doctor Dan
Doctor Dan

Reputation: 771

I would reduce the dimensionality of the problem first using PCA (Principal Component Analysis), then apply SVM. See, e.g., Andrew Ng's lecture videos

Upvotes: 3

Related Questions