How can I find the weights of the features used for classification
9 views (last 30 days)
Show older comments
I have 165 samples each contaaiing 40 features and I want to classifiy the samples into 5 classes based on the features. I was able to use the classification app in matlab using linear SVM classifier. However, I wonder if there is a way to find the weight assigned to each feature?
0 Comments
Answers (1)
bharath pro
on 2 Jul 2020
Edited: bharath pro
on 2 Jul 2020
If your using the Classifiaction learner app, then you can export the model by selecting it and clicking on the export model button on the top right (https://www.mathworks.com/help/stats/export-classification-model-for-use-with-new-data.html). You can then access the model in your workspace via the exported structure. Suppose it is called C, then C.ClassificationSVM would be your SVM model. You can access the weights using model.beta ( if it an fitcsvm object ), else you can find documentation about that particular model's weights .
0 Comments
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!