Conversation
Codecov Report
@@ Coverage Diff @@
## master #277 +/- ##
==========================================
+ Coverage 87.21% 87.63% +0.42%
==========================================
Files 94 95 +1
Lines 4653 4682 +29
==========================================
+ Hits 4058 4103 +45
+ Misses 595 579 -16
Continue to review full report at Codecov.
|
def test_set_include_and_exclude(): | ||
"""Test that transform is not created with include and exclude.""" | ||
with pytest.raises(ValueError, match="There should be exactly one option set: include or exclude"): | ||
_ = FilterFeaturesTransform() |
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.
Add exclude and include
transform = FilterFeaturesTransform(include=include) | ||
ts_with_features.fit_transform([transform]) | ||
df_transformed = ts_with_features.df | ||
expected_columns = set(ts_with_features.columns.get_level_values("feature")) |
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.
Why not set(include) ?
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.
Fixed
segments = ts_with_features.segments | ||
for column in got_columns: | ||
assert np.all( | ||
df_transformed.loc[:, pd.IndexSlice[segments, column]] |
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.
df_transformed = ts_with_features.df , why you compare it?
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.
There was a bug earlier when values between columns mixed with each other, I wanted to unsure, it is not present here.
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.
There was a mistake, it will be fixed
etna/transforms/filter.py
Outdated
"""Filters features in each segment of the dataframe.""" | ||
|
||
def __init__(self, include: Optional[Sequence[str]] = None, exclude: Optional[Sequence[str]] = None): | ||
"""Create instance of LagTransform. |
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.
LagTransform??
etna/transforms/filter.py
Outdated
Parameters | ||
---------- | ||
df: | ||
dataframe with data to fit label encoder. |
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.
label encoder?
# Conflicts: # CHANGELOG.md
10b8e2f
# Conflicts: # CHANGELOG.md # etna/transforms/__init__.py
IMPORTANT: Please do not create a Pull Request without creating an issue first.
Before submitting (must do checklist)
Type of Change
Proposed Changes
Look #271.
Related Issue
#271.
Closing issues
Closes #271.