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

FIX use balanced accuracy from scikit-learn #128

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

glemaitre
Copy link
Contributor

closes #127

Copy link
Contributor

@kegl kegl left a comment

Choose a reason for hiding this comment

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

Can you check on the mouse cytometry starting kit if the new score is equivalent to the old score? Also maybe sampling some of the user submissions. https://www.ramp.studio/problems/mouse_cytometry

@glemaitre
Copy link
Contributor Author

In scikit-learn, they consider this score meaningful only in binary classification. So it will not work for multiclass.

@glemaitre
Copy link
Contributor Author

In fact, this the reason it is failing on iris (more over iris is fully balanced so not sure it is meaninful to use it there)

@glemaitre
Copy link
Contributor Author

And the discussion to make it multiclass is there:
scikit-learn/scikit-learn#10587

@kegl
Copy link
Contributor

kegl commented Apr 19, 2018

I don't want to get into these debates now, just make sure it is backward compatible. It would probably be better to create a new score, like balanced_accuracy_sk or something like that.

@glemaitre
Copy link
Contributor Author

I checked. It is back compatible for multi-class apparently and does not give bad results for the binary case. But I would need a bit more time to check.

@glemaitre
Copy link
Contributor Author

Basically the only thing is to expose the adjusted parameter. True will fall back to the previous implementation while False will not adjust for chance.

@kegl
Copy link
Contributor

kegl commented Apr 19, 2018

ok

@codecov
Copy link

codecov bot commented May 9, 2018

Codecov Report

Merging #128 into master will decrease coverage by 0.03%.
The diff coverage is 90.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #128      +/-   ##
==========================================
- Coverage   93.82%   93.78%   -0.04%     
==========================================
  Files         101      101              
  Lines        3092     3107      +15     
==========================================
+ Hits         2901     2914      +13     
- Misses        191      193       +2
Impacted Files Coverage Δ
rampwf/score_types/balanced_accuracy.py 93.33% <90.47%> (-6.67%) ⬇️

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 6814600...74887fb. Read the comment docs.

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.

Bug in balanced accuracy
2 participants