How do I generate a confusion matrix for multi-class example?

15 vues (au cours des 30 derniers jours)
Kirty Vedula
Kirty Vedula le 22 Fév 2013
Commenté : Selena Johnson le 30 Août 2018
I have 8 classes to be allocated to a 10 X 800 sized dataset. I have done the classification successfully - using Support Vector Machines. But I am puzzled as to how I can show the results of it? How do I generate a confusion matrix for 8 classes? What is the best way to view the hyperplane generated by the multiclass SVM?
Please guide me through this. Provide me some examples.
Help is very much appreciated. Thanks!

Réponses (2)

Eric Nunes
Eric Nunes le 25 Avr 2014
You just need to have 2 parameters, the predicted labels and the actual labels. After that just use C = confusionmat(predicted , Actual). It will construct the confusion matrix.

Abbas Manthiri S
Abbas Manthiri S le 7 Fév 2017
  1 commentaire
Selena Johnson
Selena Johnson le 30 Août 2018
Hi does this code work for categorical data as well? I just tried to run it and it is giving me error messages about line 45.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by