Error Displaying confusion matrix

조회 수: 1 (최근 30일)
CHRISTOPHER MILLAR
CHRISTOPHER MILLAR 2020년 3월 18일
댓글: Ahmed Driouech 2021년 12월 15일
I am trying to plot a simple confusion matrix using the plotconfusion command
outp = double(YTDKURTPred{idx,1});
targ = double(YTestTD);
plotconfusion(targ,outp)
targ is a series of labels from 1 - 4 (154 X 1)
outp is a series of predictions made by the LSTM network (154 X 1)
when i try and display the results
Is there an error with my code or is it a graphics issue?
Thanks in advance
  댓글 수: 4
CHRISTOPHER MILLAR
CHRISTOPHER MILLAR 2021년 12월 15일
Hi
I cannot exactly remember but going by my comment below I changed my targ variable to be of type categorical rather than double and it seemed to fix the issue
Hope this helps
Ahmed Driouech
Ahmed Driouech 2021년 12월 15일
that doesnt work for me for some reason. What I had before is this:
labels=EMNIST_train(:,1);
targets= dummyvar(labels);

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

채택된 답변

CHRISTOPHER MILLAR
CHRISTOPHER MILLAR 2020년 3월 23일
Its ok I have fixed the problem
I had to set them as categoricals and now it works fine
Thanks for comign back to me

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by