Display bug with confusionchart for percentages summary

조회 수: 2 (최근 30일)
Vincent Rougeau-Moss
Vincent Rougeau-Moss 2018년 9월 29일
편집: Vincent Rougeau-Moss 2018년 10월 11일
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일
편집: 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