etna
etna copied to clipboard
ChangePointSegmentationTransform
Before submitting (must do checklist)
- [x] Did you read the contribution guide?
- [x] Did you update the docs? We use Numpy format for all the methods and classes.
- [x] Did you write any new necessary tests?
- [x] Did you update the CHANGELOG?
Proposed Changes
Closing issues
closes #821
🚀 Deployed on https://deploy-preview-822--etna-docs.netlify.app
Codecov Report
Merging #822 (20949d0) into master (0198d11) will increase coverage by
0.09%
. The diff coverage is97.84%
.
@@ Coverage Diff @@
## master #822 +/- ##
==========================================
+ Coverage 84.66% 84.75% +0.09%
==========================================
Files 130 132 +2
Lines 7414 7471 +57
==========================================
+ Hits 6277 6332 +55
- Misses 1137 1139 +2
Impacted Files | Coverage Δ | |
---|---|---|
...sforms/decomposition/change_points_segmentation.py | 97.50% <97.50%> (ø) |
|
...tna/transforms/decomposition/base_change_points.py | 97.56% <97.56%> (ø) |
|
etna/analysis/change_points_trend/search.py | 100.00% <100.00%> (ø) |
|
etna/transforms/__init__.py | 100.00% <100.00%> (ø) |
|
etna/transforms/decomposition/__init__.py | 100.00% <100.00%> (ø) |
|
...na/transforms/decomposition/change_points_trend.py | 98.78% <100.00%> (-0.17%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
- Create the base class for change points models
BaseChangePointModelAdapter
:
-
get_change_points(self, df:pd DataFrame, in_column: str) -> List[pd.Timestamp]
-- abstract -
build_intervals(change_points: List[pd.Timestamp]) ->List[TTimestampInterval]
-- use the current implementation
- Create
RupturesChangePointModel(BaseChangePointModelAdapter)
:
-
__init__(self, change_point_model: BaseEstimator, **change_point_model_predict_params)
- Implement
get_change_points
, use the implementation from method fit of_ChangePointsTransform
and _find_change_points_segment
- _OneSegmentChangePointsSegmentationTransform, _OneSegmentChangePointsTrendTransform now create the instance of RupturesChangePointModel inside the constructor(will get the instance of BaseChangePointModelAdapter as a parameter in ETNA 2.0)
- Improve any necessary logic and replace the _find_change_points_segment in EDA with get_change_points from RupturesChangePointModel