Repository navigation
Class Imbalance Data Check for Severe imbalance - #1905
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1905 +/- ##
============================
============================
Continue to review full report at Codecov.
|
bchen1116
marked this pull request as ready for review
March 1, 2021 21:19
bchen1116
requested review from
ParthivNaresh,
angela97lin,
chukarsten,
dsherry,
freddyaboulton and
jeremyliweishih
and removed request for
angela97lin and
dsherry
March 1, 2021 21:20
freddyaboulton
approved these changes
Mar 2, 2021
freddyaboulton
left a comment
Contributor
There was a problem hiding this comment.
@bchen1116 This looks good to me!
dsherry
reviewed
Mar 2, 2021
| if len(below_threshold) and len(sample_counts): | ||
| sample_count_values = sample_counts.index.tolist() | ||
| severe_imbalance = [v for v in sample_count_values if v in below_threshold] | ||
| warning_msg = "The following labels have severe class imbalance because they fall under {:.0f}% of the target and have less than {} samples: {}" |
Contributor
There was a problem hiding this comment.
Nit-pick: "The following labels in the target have severe class imbalanced because" etc
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
part 1 of #1864
Added check to support our severe class imbalance scenario for the new datasplitter.
Still need to address how to find multiclass class imbalances, but I'll leave that for a future PR since I think we need to discuss the best way for identifying that.