How to extract confusion-matrix from confusion-chart?
9 次查看(过去 30 天)
显示 更早的评论
I am using Neural Networks Toolbox. It allows me to plot confusion Chart by using "plotconfusion" command. But it does not allows me to see confusion matrix in the workspace. I tried to use "confusionchart" command but it pops up an error.
Error: Error using confusionchart (line 64)
Expected m to be a square matrix.
I have also attached both matrices of Targets and Outputs.
Where,
"t.mat" is a Target Matrix and "y.mat" is an output Matrix.
0 个评论
回答(1 个)
Mohammad Sami
2020-1-23
You need to use the function confusionmat
actual = t;
predicted = y;
mat = confusionmat(actual,predicted);
5 个评论
Mohammad Sami
2020-1-29
编辑:Mohammad Sami
2020-1-29
What is the type of your data ? The function accepts the following types
Data Types: single | double | logical | char | string | cell | categorical
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!