MATLAB Answers

How to extract confusion-matrix from confusion-chart?

조회 수: 20(최근 30일)
Hassan Ashraf
Hassan Ashraf 2020년 1월 22일
댓글: Hassan Ashraf 2020년 1월 29일
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.

답변(1개)

Mohammad Sami
Mohammad Sami 2020년 1월 23일
You need to use the function confusionmat
actual = t;
predicted = y;
mat = confusionmat(actual,predicted);
  댓글 수: 5
Hassan Ashraf
Hassan Ashraf 2020년 1월 29일
The data type is double

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

Community Treasure Hunt

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

Start Hunting!

Translated by