-
Notifications
You must be signed in to change notification settings - Fork 80
Make categorical encoders multisegment #554
Merged
Merged
Conversation
This file contains 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
Mr-Geekman
reviewed
Feb 21, 2022
np.testing.assert_array_almost_equal(le.transform(df2).values, expected_values) | ||
df2_transformed = le.transform(df2) | ||
for segment in segments: | ||
values = df2_transformed.loc[pd.IndexSlice[:], pd.IndexSlice[segment, "encoded_regressor_0"]].values |
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.
df2_transformed.loc[:, pd.IndexSlice[segment, "encoded_regressor_0"]].values
Mr-Geekman
reviewed
Feb 21, 2022
np.testing.assert_array_almost_equal(ohe.transform(df2).values, expected_values) | ||
df2_transformed = ohe.transform(df2) | ||
for segment in segments: | ||
values = df2_transformed.loc[pd.IndexSlice[:], pd.IndexSlice[segment, out_columns]].values |
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.
Same
Mr-Geekman
approved these changes
Feb 21, 2022
Codecov Report
@@ Coverage Diff @@
## master #554 +/- ##
==========================================
- Coverage 87.27% 87.25% -0.02%
==========================================
Files 118 118
Lines 5688 5681 -7
==========================================
- Hits 4964 4957 -7
Misses 724 724
Continue to review full report at Codecov.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
IMPORTANT: Please do not create a Pull Request without creating an issue first.
Before submitting (must do checklist)
Type of Change
Proposed Changes
Related Issue
Closing issues
closes #532