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
Add pct_null_rows
to HighlyNullDataCheck
#2211
Conversation
@@ -45,7 +45,7 @@ def validate(self, X, y=None): | |||
"data_check_name": "HighlyNullDataCheck",\ | |||
"level": "warning",\ | |||
"code": "HIGHLY_NULL",\ | |||
"details": {"column": "lots_of_null"}}],\ | |||
"details": {"column": "lots_of_null", "pct_null_rows": 0.8}}],\ |
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.
Open to suggestion: keep as 0.8 or display as percentage 80%?
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 display as percentage since the field name has the word percent in it? I don't feel super strongly about it though
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.
I think 0.8 is better for now. I believe use [0, 1] notation for percent baseline, class imbalance ratios in params and other fields. I think its nice having our codebase be consistent with how we represent percentages.
Codecov Report
@@ Coverage Diff @@
## main #2211 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 287 287
Lines 24451 24451
=======================================
Hits 24433 24433
Misses 18 18
Continue to review full report at Codecov.
|
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.
Looks good @jeremyliweishih !
@@ -45,7 +45,7 @@ def validate(self, X, y=None): | |||
"data_check_name": "HighlyNullDataCheck",\ | |||
"level": "warning",\ | |||
"code": "HIGHLY_NULL",\ | |||
"details": {"column": "lots_of_null"}}],\ | |||
"details": {"column": "lots_of_null", "pct_null_rows": 0.8}}],\ |
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 display as percentage since the field name has the word percent in it? I don't feel super strongly about it though
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.
LGTM! Don't feel too strongly about your suggestion, looks fine as is.
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.
⛴ !
@@ -45,7 +45,7 @@ def validate(self, X, y=None): | |||
"data_check_name": "HighlyNullDataCheck",\ | |||
"level": "warning",\ | |||
"code": "HIGHLY_NULL",\ | |||
"details": {"column": "lots_of_null"}}],\ | |||
"details": {"column": "lots_of_null", "pct_null_rows": 0.8}}],\ |
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.
I think 0.8 is better for now. I believe use [0, 1] notation for percent baseline, class imbalance ratios in params and other fields. I think its nice having our codebase be consistent with how we represent percentages.
@@ -57,11 +57,11 @@ def test_highly_null_data_check_warnings(): | |||
"warnings": [DataCheckWarning(message="Column 'lots_of_null' is 50.0% or more null", | |||
data_check_name=highly_null_data_check_name, | |||
message_code=DataCheckMessageCode.HIGHLY_NULL, | |||
details={"column": "lots_of_null"}).to_dict(), | |||
details={"column": "lots_of_null", "pct_null_rows": 0.8}).to_dict(), |
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.
Ah great, I was looking for a test case where this wasn't 1.0 :)
Fixes #2201.