can anybody tell me how to generate confusion matrix in support vector machine?

1 次查看(过去 30 天)
can anybody tell me how to generate confusion matrix in support vector machine? If somebody want explanation about confusion matrix then it is actually matrix which contain percent values of classification of correct classes and miscalculated classes.Like suppose I have 10 class classification and i give some input so that test values will be checked and some value will be predicted like actually and correct value in one class and wrongly predicted value in some other classes.like 80% comes in one class and rest 10 percent class 2 ,5%class 3 and 5% in class 4....like this.I want to show it in matrix form?Anybody know this how to do?

采纳的回答

the cyclist
the cyclist 2013-2-23
There is a confusionmat() command.
  2 个评论
karan dev
karan dev 2013-2-23
Thank you very much.Actually can you favor me one more thing can you tell me how to see this confusion matrix in directly percentage.Again thanks for this answer
the cyclist
the cyclist 2013-2-23
编辑:the cyclist 2013-2-24
Well, the on-diagonal elements are the counts of the correctly classified objects, so you just need the sum of those counts divided by the total count. If C is your confusion matrix, then I believe
>> sum(diag(C))/sum(C(:))
is the fraction of correctly classified objects.
Sound right?
You can do similar division of counts by totals to get any of the percentages you want.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by