Borrar filtros
Borrar filtros

how to make confusion matrix has class names

8 visualizaciones (últimos 30 días)
Jerry
Jerry el 14 de Mzo. de 2012
Comentada: Vikas el 10 de Feb. de 2014
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

Respuestas (1)

Antje
Antje el 23 de Mayo de 2013
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 comentarios
Vikas
Vikas el 10 de Feb. de 2014
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 el 10 de Feb. de 2014
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?

Iniciar sesión para comentar.

Categorías

Más información sobre Numeric Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by