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

Change colors of confusion matrix to shades of blue and change the axis order to match scikit-learn's #426

Merged
merged 6 commits into from
Mar 1, 2020

Conversation

angela97lin
Copy link
Contributor

@angela97lin angela97lin commented Feb 27, 2020

Closes #425.
image

@angela97lin angela97lin self-assigned this Feb 27, 2020
@codecov
Copy link

codecov bot commented Feb 27, 2020

Codecov Report

Merging #426 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #426   +/-   ##
=======================================
  Coverage   97.47%   97.47%           
=======================================
  Files         105      105           
  Lines        3287     3290    +3     
=======================================
+ Hits         3204     3207    +3     
  Misses         83       83           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5dba555...3347cbf. Read the comment docs.

Copy link
Contributor

@kmax12 kmax12 left a comment

Choose a reason for hiding this comment

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

this looks good. one other change would be to change the axis order to match scikit learn as well. so the correct predicts are the diagonal that go top left to bottom right.

@angela97lin angela97lin changed the title Change colors of confusion matrix to shades of blue Change colors of confusion matrix to shades of blue and change the axis order to match scikit-learn's Feb 27, 2020
@angela97lin
Copy link
Contributor Author

@kmax12 done! I updated the image I attached with the new axis order :)

@angela97lin
Copy link
Contributor Author

@kmax12 okay, I think I actually updated the plot to match sklearn's now (see attached photo) 👍
image

@@ -206,14 +206,19 @@ def generate_confusion_matrix(self, pipeline_id, fold_num=None):
conf_mat = data[fold_num]
labels = conf_mat.columns

# reverse columns in confusion matrix to change axis order to match sklearn's
conf_mat = conf_mat.iloc[:, ::-1]
Copy link
Contributor

Choose a reason for hiding this comment

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

does it make sense to do this here or in get_confusion_matrix_data function? ideally that function returns the data as closely as possible to what makes it easy to create the graph

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm, I agree that given what we previously talked about (generate_confusion_matrix should simply take in the data and graph it) that makes sense. I've updated the PR to move the reversal to get_confusion_matrix_data though I wonder if the confusion matrix data feels less intuitive to read now 🤔 What do you think?
image

Copy link
Contributor

@kmax12 kmax12 left a comment

Choose a reason for hiding this comment

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

LGTM

@angela97lin angela97lin merged commit 6105522 into master Mar 1, 2020
@angela97lin angela97lin mentioned this pull request Mar 9, 2020
@angela97lin angela97lin deleted the 425_confusion_matrix_readability branch April 17, 2020 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase readability of confusion matrix plot
2 participants