Display bug with confusionchart for percentages summary

5 visualizaciones (últimos 30 días)
The "confusionchart" function seems to have a bug with the display of the summary percentage that is never displayed, as in this image.
Curiously, with another code that uses the same data, the summary did not work at first, but after a while, it suddenly started to show the percentages when I ran the code.
I have tried different ways to display this (based on the Matlab documentation) and even after closing Matlab and relaunching the code, it does not change the result of the display which continues to display the summary without the percentages.
Test #1: (I also tried with only the ColumnSummary or the RowSummary, but the percentages are not displayed)
fig = figure();
[cm] = confusionchart(imdsValidation.Labels, YPred);
cm.ColumnSummary = 'column-normalized';
cm.RowSummary = 'row-normalized';
% Resize the container of the confusion chart so percentages appear in the row summary
fig_Position = fig.Position;
fig_Position(3) = fig_Position(3)*1.5; %Only change the width of the figure.
fig.Position = fig_Position;
Test #2:
fig = figure();
[cm] = confusionchart(imdsValidation.Labels, YPred,'RowSummary','row-normalized','ColumnSummary','column-normalized');
% Resize the container of the confusion chart so percentages appear in the row summary
fig_Position = fig.Position;
fig_Position(3) = fig_Position(3)*1.5; %Only change the width of the figure.
fig.Position = fig_Position;
It seems that the summary view only works sometimes. This method also works, but the display is smaller and so the numbers are very difficult to read in this case with 40 classes.
plotconfusion(imdsValidation.Labels,YPred);
I do not know if there is a solution to fix this bug, but if there is one, I would like to know. It is possible that it is due to the fact that I am on Linux Ubuntu 18.04 LTS.

Respuesta aceptada

Bernhard Suhm
Bernhard Suhm el 11 de Oct. de 2018
Many machine learning related charts will start to show some weird behavior if you try to visualize a lot of classes. If you are current on support, why don't you file a case with our tech support?
  1 comentario
Vincent Rougeau-Moss
Vincent Rougeau-Moss el 11 de Oct. de 2018
Editada: Vincent Rougeau-Moss el 11 de Oct. de 2018
I am on the current support, so I will create a case for the technical support. I thought maybe I was doing something wrong with the call of the function and that was the cause of this problem.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by