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 Permutation Importance error on standard scaler #2938

Merged
merged 3 commits into from
Oct 19, 2021

Conversation

bchen1116
Copy link
Contributor

fix #2863

@bchen1116 bchen1116 self-assigned this Oct 19, 2021
@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #2938 (5ef67a4) into main (6f8d37a) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2938     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        302     302             
  Lines      28587   28593      +6     
=======================================
+ Hits       28494   28500      +6     
  Misses        93      93             
Impacted Files Coverage Δ
...components/transformers/scalers/standard_scaler.py 100.0% <100.0%> (ø)
...understanding_tests/test_permutation_importance.py 100.0% <100.0%> (ø)

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 6f8d37a...5ef67a4. Read the comment docs.

@@ -38,7 +38,7 @@ def transform(self, X, y=None):
pd.DataFrame: Transformed data.
"""
X = infer_feature_types(X)
X = X.ww.select_dtypes(exclude=["datetime"])
X = X.ww.select(exclude=["datetime"])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this to avoid the WoodworkNotInitError

Copy link
Contributor

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

Looks good to me @bchen1116 ! Thank you

@bchen1116 bchen1116 merged commit 08601ea into main Oct 19, 2021
@chukarsten chukarsten mentioned this pull request Oct 27, 2021
@freddyaboulton freddyaboulton deleted the bc_2863_permutation branch May 13, 2022 15:35
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.

calculate_permutation_importance loses ww type
2 participants