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?
0 个评论
采纳的回答
the cyclist
2013-2-23
There is a confusionmat() command.
2 个评论
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 Center 和 File 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!