Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get label colour from raw confusion matrix #4206

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Conversation

gonnet
Copy link
Contributor

@gonnet gonnet commented Sep 30, 2020

Motivation for features / changes

This code was choosing the label colour based on the row-normalized confusion matrix values, but the background colour of each square is chosen from the un-normalized confusion matrix.

This causes problems for under-represented labels where all the squares in one row are light, but the label colour switches to white if any entry in the row has more than 0.5 relative to the row.

Technical description of changes

Use the un-normalized confusion matrix when deciding which colour to give a label.

Screenshots of UI changes

Before (left) and after (right) the change, using data from a different run than in the guide. Note how the text of the leftmost square in the middle row is now visible.

image

This code was choosing the label colour based on the row-normalized confusion matrix values, but the background colour of each square is chosen from the un-normalized confusion matrix.

This causes problems for under-represented labels where all the squares in one row are light, but the label colour switches to white if any entry in the row has more than 0.5 relative to the row.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@gonnet
Copy link
Contributor Author

gonnet commented Oct 7, 2020

@nfelt Can you take a quick look at this? I was not able to assign a reviewer myself... Thanks!

Copy link
Collaborator

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@nfelt nfelt merged commit fe7f51f into tensorflow:master Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants