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(steps): add unit test and fix null cols for impute #157

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

jitingxu1
Copy link
Collaborator

changes:

  1. add unit test for _impute.py
  2. raise a value error if one column is all NULL, because it does not fulfill users' original goal.

resolve #117

@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.35%. Comparing base (6582682) to head (5e78804).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   85.39%   89.35%   +3.95%     
==========================================
  Files          26       28       +2     
  Lines        1924     2047     +123     
==========================================
+ Hits         1643     1829     +186     
+ Misses        281      218      -63     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@deepyaman deepyaman left a comment

Choose a reason for hiding this comment

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

Left some comments, but maybe more fundamentally—why is this necessary/what motivated it? If somebody wants to fill their missing values with None, should I care? E.g. maybe they want to represent all the missing value as NULL (and not NaN), so they do this. Alternatively if you see scikit-learn SimpleImputer, they later let the user customize what is considered "missing".

tests/test_impute.py Outdated Show resolved Hide resolved
ibis_ml/steps/_impute.py Outdated Show resolved Hide resolved
@deepyaman
Copy link
Collaborator

Left some comments, but maybe more fundamentally—why is this necessary/what motivated it? If somebody wants to fill their missing values with None, should I care? E.g. maybe they want to represent all the missing value as NULL (and not NaN), so they do this. Alternatively if you see scikit-learn SimpleImputer, they later let the user customize what is considered "missing".

I'm pushing to deprioritize this beyond today, unless you feel it's particularly pressing. Let's focus on getting the other PRs in for release.

@jitingxu1
Copy link
Collaborator Author

jitingxu1 commented Sep 17, 2024

Left some comments, but maybe more fundamentally—why is this necessary/what motivated it? If somebody wants to fill their missing values with None, should I care? E.g. maybe they want to represent all the missing value as NULL (and not NaN), so they do this. Alternatively if you see scikit-learn SimpleImputer, they later let the user customize what is considered "missing".

Instead of raise an error, I change it to throw a warning to the user. User should know the imputing does not work as expected, since there are still some nulls in the column

@jitingxu1 jitingxu1 self-assigned this Sep 17, 2024
@deepyaman deepyaman merged commit b8aebcb into ibis-project:main Sep 25, 2024
4 checks passed
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(steps): handle col with all nulls in impute
3 participants