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

Skip to content

Add references for multiclass balanced-accuracy definitions #9982

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

Merged
merged 6 commits into from
Oct 29, 2017

Conversation

maskani-moh
Copy link
Contributor

Reference Issues/PRs

In addition to #8066

What does this implement/fix? Explain your changes.

I added some references from the literature for the multiclass balanced accuracy. The threads #6747 and #8066 cited some papers and their different implementations of the metric. There was no real consensus about what was the definition to use, so the user might want to implement the one of his/her/their choice.

@maskani-moh
Copy link
Contributor Author

@amueller
Do you think we should describe/comment the different definitions for the balanced-accuracy or we should leave it as it is now?

Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

You should mention that none are currently implemented in scikit-learn

@@ -467,6 +467,8 @@ given binary ``y_true`` and ``y_pred``:
* Normalized class-wise accuracy average as described in [Guyon2015]_
* Macro-average recall as described in [Mosley2013]_

Note that none of these different definitions are currently implemented in scikit-learn.
Copy link
Member

Choose a reason for hiding this comment

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

But macro-average recall is implemented? @jnothman

Copy link
Member

@jnothman jnothman Oct 24, 2017

Choose a reason for hiding this comment

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

I meant not implemented within balanced_accuracy_score

@amueller
Copy link
Member

I would also mention Class balanced accuracy from here: #6747 (comment) because that's closely related to macro average recall.

@amueller
Copy link
Member

The book "MAchine Learning for Predictive Data Analytics" by Kelleher et al also uses macro average recall as average class accuracy. Might be another good reference.

@jnothman
Copy link
Member

I'm trying to remember if somewhere in this discussion I saw something that takes the recall of each class and the recall of the complement of each class and macro-averages... I.e. the average of balanced accuracy for each binarized class.

@maskani-moh
Copy link
Contributor Author

@amueller
In this comment do you refer to the equation (2.9) in the thesis?

You say it's closely related to the macro average recall. But in the definition given it says:

Balanced Accuracy is the Recall for each class, averaged over the
number of classes

Isn't this the macro-average recall in itself (i.e. the average over all classes of the recall for each class)?

@amueller
Copy link
Member

No, 2.9 is just reiterating what I think is one common definition of balanced accuracy, which is macro-average recall. I guess we could add that to the references that use this definition. I was referring to 3.4, which is class balanced accuracy.

* Normalized class-wise accuracy average as described in [Guyon2015]_
* Macro-average recall as described in [Mosley2013]_ and [Kelleher2015]_

Note that none of these different definitions are currently implemented within
Copy link
Member

Choose a reason for hiding this comment

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

I would add either here or above that macro-average recall is implemented in sklearn.

There is no clear consensus on the definition of a balanced accuracy for the
multiclass setting. Here are some definitions that can be found in the literature:

* Normalized class-wise accuracy average as described in [Guyon2015]_
Copy link
Member

Choose a reason for hiding this comment

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

can you give a definition? maybe for both?

Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jnothman jnothman merged commit 9172a59 into scikit-learn:master Oct 29, 2017
@maskani-moh
Copy link
Contributor Author

maskani-moh commented Oct 29, 2017

@jnothman
I was just adding the "class balance accuracy" as suggested by @amueller
Should I open a create a new PR?

It's done, just need your approval. I've just pushed the changes.

@jnothman
Copy link
Member

jnothman commented Oct 29, 2017 via email

maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Oct 29, 2017
@maskani-moh
Copy link
Contributor Author

@jnothman
I think I mistakenly reverted the changes.
Is there any way to fix that?

@jnothman
Copy link
Member

jnothman commented Oct 29, 2017 via email

@maskani-moh
Copy link
Contributor Author

Here is the correcting PR #10040

maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
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.

3 participants