Skip to content

Commit

Permalink
Update pipelines docs and fix typo in EDA tutorial (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemLiA authored Jul 2, 2024
1 parent 4a8bbb5 commit 6863aab
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 22 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
-
-
-
-
- Update pipelines documentation ([#408](https://github.com/etna-team/etna/pull/408))
- Update formulas for metrics in documentation ([#406](https://github.com/etna-team/etna/pull/406))
-
- Update documentation to explain how to contribute and work with discussions, update templates for issues ([#395](https://github.com/etna-team/etna/pull/395))
Expand All @@ -30,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Fix rendering in 210 tutorial ([#386](https://github.com/etna-team/etna/pull/386))
- Fix typo in 103 tutorial ([#408](https://github.com/etna-team/etna/pull/408))
- Remove sorting of `ts.df` by timestamps in `plot_forecast` and `plot_forecast_decomposition` ([#410](https://github.com/etna-team/etna/pull/410))
-
-
Expand Down
2 changes: 1 addition & 1 deletion etna/core/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def set_params(self, **params: dict) -> Self:
>>> from etna.pipeline import Pipeline
>>> from etna.models import NaiveModel
>>> from etna.transforms import AddConstTransform
>>> model = model=NaiveModel(lag=1)
>>> model = NaiveModel(lag=1)
>>> transforms = [AddConstTransform(in_column="target", value=1)]
>>> pipeline = Pipeline(model, transforms=transforms, horizon=3)
>>> pipeline.set_params(**{"model.lag": 3, "transforms.0.value": 2})
Expand Down
7 changes: 7 additions & 0 deletions etna/ensembles/direct_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ class DirectEnsemble(EnsembleMixin, SaveEnsembleMixin, BasePipeline):
For each point in the future, forecast of the ensemble is forecast of base pipeline with the shortest horizon,
which covers this point.
See Also
--------
etna.pipeline.Pipeline:
Pipeline that forecasts values in one iteration using a model.
etna.pipeline.AutoRegressivePipeline:
Pipeline that forecasts values in several iterations using a model.
Examples
--------
>>> from etna.datasets import generate_ar_df
Expand Down
13 changes: 12 additions & 1 deletion etna/pipeline/autoregressive_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@
class AutoRegressivePipeline(
ModelPipelinePredictMixin, ModelPipelineParamsToTuneMixin, SaveModelPipelineMixin, BasePipeline
):
"""Pipeline that make regressive models autoregressive.
"""
Pipeline that make regressive models autoregressive.
Makes forecast in several iterations, on each of them applies transforms and
predict ``step`` values by using forecast method of model.
See Also
--------
etna.pipeline.Pipeline:
Makes forecast in one iteration.
etna.ensembles.DirectEnsemble:
Makes forecast by merging the forecasts of base pipelines.
Examples
--------
Expand Down
14 changes: 13 additions & 1 deletion etna/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@


class Pipeline(ModelPipelinePredictMixin, ModelPipelineParamsToTuneMixin, SaveModelPipelineMixin, BasePipeline):
"""Pipeline of transforms with a final estimator."""
"""
Pipeline of transforms with a final estimator.
Makes forecast in one iteration, during which applies transforms and makes
call for forecast method for model.
See Also
--------
etna.pipeline.AutoRegressivePipeline:
Makes forecast in several iterations.
etna.ensembles.DirectEnsemble:
Makes forecast by merging the forecasts of base pipelines.
"""

def __init__(self, model: ModelType, transforms: Sequence[Transform] = (), horizon: int = 1):
"""
Expand Down
36 changes: 18 additions & 18 deletions examples/103-EDA.ipynb

Large diffs are not rendered by default.

0 comments on commit 6863aab

Please sign in to comment.