Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@glemaitre
Copy link
Member

Reference Issues/PRs

closes #14478

What does this implement/fix? Explain your changes.

Move the normalization normalize from plot_confusion_matrix to confusion_matrix.
I added a couple of test and handle division by zeros without raising warning.

Any other comments?

@glemaitre
Copy link
Member Author

@glemaitre glemaitre changed the title ENH add normalize parameter to confusion_matrix [MRG] ENH add normalize parameter to confusion_matrix Nov 14, 2019
@thomasjpfan thomasjpfan self-requested a review November 14, 2019 17:00
@glemaitre glemaitre added this to the 0.22 milestone Nov 14, 2019
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Looks good. I agree it makes more sense to have it in confusion_matrix rather than in the plot utility

normalize : {'true', 'pred', 'all'}, default=None
Normalizes confusion matrix over the true (rows), predicted (columns)
conditions or all the population. If None, confusion matrix will not be
Copy link
Member

Choose a reason for hiding this comment

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

what is "conditions"?

Copy link
Member Author

Choose a reason for hiding this comment

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

True conditions, predicted conditions. I think that it is one way to call true values and predicted values.

normalize : {'true', 'pred', 'all'}, default=None
Normalizes confusion matrix over the true (rows), predicited (columns)
Normalizes confusion matrix over the true (rows), predicted (columns)
conditions or all the population. If None, confusion matrix will not be
Copy link
Member

Choose a reason for hiding this comment

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

same here lol

Copy link
Member Author

Choose a reason for hiding this comment

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

I copied it from here :). Seeking a bit more, this is defined in this way on wikipedia: https://en.wikipedia.org/wiki/Confusion_matrix

Copy link
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

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

I'm still wondering why we need to divide the entire matrix (though I won't oppose).

@qinhanmin2014
Copy link
Member

Seems that @jnothman don't like it? #14478 (comment)

@jnothman
Copy link
Member

jnothman commented Nov 15, 2019 via email

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.

4 participants