etna icon indicating copy to clipboard operation
etna copied to clipboard

ChangePointSegmentationTransform

Open Ama16 opened this issue 2 years ago • 3 comments

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

Ama16 avatar Jul 28 '22 08:07 Ama16

🚀 Deployed on https://deploy-preview-822--etna-docs.netlify.app

github-actions[bot] avatar Jul 28 '22 08:07 github-actions[bot]

Codecov Report

Merging #822 (20949d0) into master (0198d11) will increase coverage by 0.09%. The diff coverage is 97.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

codecov-commenter avatar Jul 28 '22 09:07 codecov-commenter

  1. 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
  1. 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
  1. _OneSegmentChangePointsSegmentationTransform, _OneSegmentChangePointsTrendTransform now create the instance of RupturesChangePointModel inside the constructor(will get the instance of BaseChangePointModelAdapter as a parameter in ETNA 2.0)
  2. Improve any necessary logic and replace the _find_change_points_segment in EDA with get_change_points from RupturesChangePointModel

alex-hse-repository avatar Aug 11 '22 08:08 alex-hse-repository