Display bug with confusionchart for percentages summary

5 次查看(过去 30 天)
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.

采纳的回答

Bernhard Suhm
Bernhard Suhm 2018-10-11
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 个评论
Vincent Rougeau-Moss
编辑:Vincent Rougeau-Moss 2018-10-11
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by