MATLAB Answers

How can I restrict the number of features for testing set in SVM classification with linear kernel?

9 views (last 30 days)
Nikita Mirchandani
Nikita Mirchandani on 10 Jan 2021
Answered: Aditya Patil on 17 Feb 2021
I have trained a dataset with linear SVM with 300 features. However, I want to restrict the number of features to 150. How can I find which features are most critical to classification?

Answers (1)

Aditya Patil
Aditya Patil on 17 Feb 2021
Generally, you can't determine feature importance in SVM, unless a linear kernel is used. Refer following answer for more information. It's recommended to use feature extraction or dimensionality reduction techniques instead of SVM. https://se.mathworks.com/matlabcentral/answers/406577-how-can-i-determine-feature-importance-of-an-svm-classifier

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!