Classification accuracy change every time
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear
I extracted feature from emg signal and when i classify it by below methods:
1-classification app: During classifcation classifier and accuracy change every time. like when i classify first time it show fine SVM give 70% accuracy and next time when I classify it then it show highest accuracy at 60% by KNN.
2- Secondly, I used nnstart app, it also show different accuracy of same data at different times.
Kindlly explain me its reason.
Thank you
1 commentaire
Razan Alyahya
le 22 Nov 2020
May you please provide me with the code for SVM classifier for EMG signals ?
Réponses (1)
Walter Roberson
le 5 Déc 2019
Classification app and the functions reached from nnstart all initialize randomly. If you need to be able to reproduce every time, then you would need to use rng() to set the same random number seed each time.
3 commentaires
Walter Roberson
le 5 Déc 2019
You would type
rng(655321)
at the command line before starting the classification app. Then do one classification step. Then quit classification app and do the same rng() again and start classification app again before running the test again.
You just might be able to get away with typing the rng() command at the command line between runs in the GUI of classification app.
Generally speaking, if you need to exactly replicate runs to prove that you can exactly replicate runs, then you should probably not be using the classification app or nnstart, and should instead be using the underlying MATLAB library calls with the datastructures initialized as appropriate for your situation.
It is normal that if you fit exactly the same data twice in a row in classification app or nnstart, that you will get different results. It is designed that way.
This is inherent to how the classification tools work. The tools are not able to calculate a global "best" set of parameters: they randomize starting conditions and they calculate with those conditions, and then they randomize again and calculate again, and keep doing that for a while, looking for the best set of starting conditions.
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!