How to extract confusion-matrix from confusion-chart?

조회 수: 7 (최근 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
Mohammad Sami
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
Hassan Ashraf
Hassan Ashraf 2020년 1월 29일
The data type is double

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

카테고리

Help CenterFile 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!

Translated by