Skip to content
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

Update pipelines docs and fix typo in EDA tutorial #408

Merged
merged 8 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
--------
Pipeline:
Pipeline that forecasts values in one iteration using a model.
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
d-a-bunin marked this conversation as resolved.
Show resolved Hide resolved
--------
Pipeline:
Makes forecast in one iteration.
DirectEnsemble:
d-a-bunin marked this conversation as resolved.
Show resolved Hide resolved
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
d-a-bunin marked this conversation as resolved.
Show resolved Hide resolved
--------
AutoRegressivePipeline:
Makes forecast in several iterations.
DirectEnsemble:
d-a-bunin marked this conversation as resolved.
Show resolved Hide resolved
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.

Loading