-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Add balanced accuracy score in metrics #5588
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
Conversation
|
||
# convert yt, yp into index | ||
y_pred = np.array([label_to_ind.get(x, n_labels + 1) for x in y_pred]) | ||
y_true = np.array([label_to_ind.get(x, n_labels + 1) for x in y_true]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can re-use the confusion matrix here. What do you think?
I would add some intuition about why this metrics is useful, especially on imbalanced datasets. |
If the above comments are addressed, I am +1! Thanks @TTRh ! |
Thanks for the comments !
|
+1 for a separate section. |
Any news on this PR? The code seems OK (but I don't have much experience). Two remarks:
|
Hi, sorry i forgot that one, i should also add a separate section in the user guide. I will update this PR regarding comments. |
fe6efaa
to
b7e8229
Compare
I just added a separate section in user guide. Also i'm thinking about extend balanced accuracy to multiclass classification problems by taking balanced accuracy as the recall for each class averaged over the number of classes. WDYT @arjoly ? |
@TTRh Do you have example of such an extension? |
Btw, there's been yet another attempt at this enhancement in #6752 |
Closed by #8066. |
I work on this one : #3506 (adding balanced accuracy score) during the sprint. It's my first contribution.
There was already 3 PRs on that issue but not completed : #4300 #3929 #3511
I implement a simple version which works only for binary classification case. I also add test and doc inputs.
Thanks for the feed back