Classification accuracy change every time
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Razan Alyahya
il 22 Nov 2020
May you please provide me with the code for SVM classifier for EMG signals ?
Risposte (1)
Walter Roberson
il 5 Dic 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 Commenti
Walter Roberson
il 5 Dic 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.
Vedere anche
Categorie
Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!