필터 지우기
필터 지우기

how to make confusion matrix has class names

조회 수: 8 (최근 30일)
Jerry
Jerry 2012년 3월 14일
댓글: Vikas 2014년 2월 10일
hi all; is there any way to show class names on the confusionmatrix which is plotted by plotconfusion? I found that the set(h,'XTickLabel') does not work.
Thanks a lot regards

답변 (1개)

Antje
Antje 2013년 5월 23일
Hi!
For me this example works fine:
a=[1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0];
b=[1 0 1 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0];
figure(1)
plotconfusion(a,b)
xlabel('string')
set(gca,'xticklabel',{'class1' 'class2' ''})
Hope this helps!
  댓글 수: 2
Vikas
Vikas 2014년 2월 10일
Hi,
If a=[1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0]; b=[1 0 1 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0]; a=[1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 0]; b=[1 0 1 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0]; and using plotconfusion(a,b,'name1',c,d,'name2') then is there way to change the name of class in both the plots?
Vikas
Vikas 2014년 2월 10일
Hi,
If a=[1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0]; b=[1 0 1 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0]; c=[1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 0]; d=[1 0 1 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0]; and using plotconfusion(a,b,'name1',c,d,'name2') then is there way to change the name of class in both the plots?

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

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by