-
Notifications
You must be signed in to change notification settings - Fork 7
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 target
leakage in MeanSegmentEncoderTransform
#503
Conversation
target
leakage in MeanSegmentEncoderTransform
target
leakage in MeanSegmentEncoderTransformtarget
leakage in MeanSegmentEncoderTransform
pd.testing.assert_frame_equal(transformed_simple_df, transformed_df) | ||
|
||
|
||
def test_subset_segments(simple_ts): |
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.
We have such type of tests in inference tests
🚀 Deployed on https://deploy-preview-503--etna-docs.netlify.app |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #503 +/- ##
=======================================
Coverage 90.51% 90.51%
=======================================
Files 247 247
Lines 16516 16508 -8
=======================================
- Hits 14950 14943 -7
+ Misses 1566 1565 -1 ☔ View full report in Codecov by Sentry. |
column = transformed_df.loc[:, pd.IndexSlice[segment, "segment_code"]] | ||
assert column.dtype == "category", "Column type is not category" | ||
assert np.all(column == column.iloc[0]), "Values are not the same for the whole column" | ||
codes.add(column.iloc[0]) | ||
assert codes == {0, 1}, "Codes are not 0 and 1" | ||
|
||
|
||
def test_subset_segments(simple_ts): |
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.
The same as for MeanSegmentEncoder
Before submitting (must do checklist)
Proposed Changes
Closing issues
closes #400