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

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!

답변 (2개)

Eric Nunes
Eric Nunes 2014년 4월 25일

1 개 추천

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 2017년 2월 7일

0 개 추천

댓글 수: 1

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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

질문:

2013년 2월 22일

댓글:

2018년 8월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by