Skip to content

Commit

Permalink
Update documentation with new tutorial about working with misaligned …
Browse files Browse the repository at this point in the history
…data (#288)
  • Loading branch information
d-a-bunin authored Apr 1, 2024
1 parent a0e4cb2 commit 0b2112f
Show file tree
Hide file tree
Showing 8 changed files with 2,230 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
-
-
-
- Add tutorial about working with misaligned data ([#288](https://github.com/etna-team/etna/pull/288))
-
-
-
Expand All @@ -46,7 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
-
-
-
- Update glossary with terms related to working with misaligned data ([#288](https://github.com/etna-team/etna/pull/288))
-
- Add ignoring of integer timestamp as a feature into native DL models ([#210](https://github.com/etna-team/etna/pull/210))
- Update `pytorch_forecasting` models to handle integer timestamp ([#208](https://github.com/etna-team/etna/pull/208))
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ We have also prepared a set of tutorials for an easy introduction:
| [Custom model and transform](https://github.com/etna-team/etna/tree/master/examples/301-custom_transform_and_model.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/301-custom_transform_and_model.ipynb) |
| [Inference: using saved pipeline on a new data](https://github.com/etna-team/etna/tree/master/examples/302-inference.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/302-inference.ipynb) |
| [Hierarchical time series](https://github.com/etna-team/etna/blob/master/examples/303-hierarchical_pipeline.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/303-hierarchical_pipeline.ipynb) |
| [Forecast interpretation](https://github.com/etna-team/etna/tree/master/examples/304-forecasting_interpretation.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/304-forecasting_interpretation.ipynb) |
| [Forecast interpretation](https://github.com/etna-team/etna/tree/master/examples/304-forecasting_interpretation.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/304-forecasting_interpretation.ipynb) |
| [Classification](https://github.com/etna-team/etna/blob/master/examples/305-classification.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/305-classification.ipynb) |
| [Prediction intervals](https://github.com/etna-team/etna/tree/master/examples/306-prediction_intervals.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/306-prediction_intervals.ipynb) |
| [Working with misaligned data](https://github.com/etna-team/etna/tree/master/examples/307-working_with_misaligned_data.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/etna-team/etna/master?filepath=examples/307-working_with_misaligned_data.ipynb) |

## Documentation

Expand Down
3 changes: 3 additions & 0 deletions docs/source/api_reference/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ Utilities for data manipulation:

duplicate_data
set_columns_wide
infer_alignment
apply_alignment
make_timestamp_df_from_alignment
28 changes: 22 additions & 6 deletions docs/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ This page lists some common terms used in documentation of the library.
Time series
A series of variable measurements obtained at successive times according to :term:`frequency <time series frequency>`.

Time series frequency
Quantity that determines how often we take measurements for :term:`time series`.
Timestamps
Times at which measurements are taken for :term:`time series`.

Regular timestamps
:term:`Timestamps` that are spaced regularly, for example every hour.
It doesn't have to be always the same number of seconds.
For example, taking the first day of each month is a valid frequency.
For example, taking the first day of each month gives regular timestamps.

Irregular timestamps
:term:`Timestamps` that aren't spaced regularly, for example it can be times at which our backend server receives a request.

Time series frequency
Quantity that determines the size of spaces between :term:`regular timestamps`. Examples of frequencies: hourly, daily, monthly.

Univariate time series
A single :term:`time series` containing measurements of a scalar variable.
Expand All @@ -29,7 +38,14 @@ This page lists some common terms used in documentation of the library.
Hierarchical time series
Multiple :term:`time series` having a level structure in which higher levels can be disaggregated
by different attributes of interest into series of lower levels.
See :doc:`tutorials/14-hierarchical_pipeline`.
See :doc:`tutorials/303-hierarchical_pipeline`.

Aligned time series
Set of :term:`time series` that have the same :term:`time series frequency` and end with the same :term:`timestamps`.

Misaligned time series
Set of :term:`time series` that have the same :term:`time series frequency`, but end with different :term:`timestamps`.
These times series can be shifted in time to become aligned.

Segment
We use this term to refer to one :term:`time series` in a :term:`dataset`.
Expand Down Expand Up @@ -84,15 +100,15 @@ This page lists some common terms used in documentation of the library.
Backtesting
Type of cross-validation when we check the quality of the forecast model using historical data.

Per-segment / local approach
Per-segment / Local approach
Mode of operation when there is a separate :term:`model` / :term:`transform` for each :term:`segment` of the dataset.

Multi-segment / Global approach
Mode of operation when there is one :term:`model` / :term:`transform` for every :term:`segment` of the dataset.

Forecasting strategy
Algorithm for using an ML model to produce a multi-step time series :term:`forecast <forecasting>`.
See :doc:`tutorials/09-forecasting_strategies`.
See :doc:`tutorials/208-forecasting_strategies`.

Forecasting context
Suffix of a :term:`dataset` we want to :term:`forecast <forecasting>` that is necessary for the :term:`model` we are using.
Expand Down
9 changes: 9 additions & 0 deletions docs/source/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,12 @@ Advanced

^^^
How to estimate prediction intervals

.. grid-item-card:: Working with misaligned data
:text-align: center
:link: tutorials/307-working_with_misaligned_data
:link-type: doc
:class-header: card-tutorial-advanced

^^^
How to work with misaligned data
3 changes: 3 additions & 0 deletions etna/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
from etna.datasets.internal_datasets import load_dataset
from etna.datasets.tsdataset import TSDataset
from etna.datasets.utils import DataFrameFormat
from etna.datasets.utils import apply_alignment
from etna.datasets.utils import duplicate_data
from etna.datasets.utils import infer_alignment
from etna.datasets.utils import make_timestamp_df_from_alignment
from etna.datasets.utils import set_columns_wide
2,177 changes: 2,177 additions & 0 deletions examples/307-working_with_misaligned_data.ipynb

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ We have prepared a set of tutorials for an easy introduction:
- `DirectEnsemble`
- Summary


#### [Mechanics of forecasting](https://github.com/etna-team/etna/tree/master/examples/209-mechanics_of_forecasting.ipynb)
- Loading dataset
- Forecasting
Expand Down Expand Up @@ -180,7 +179,6 @@ We have prepared a set of tutorials for an easy introduction:
- Loading pretrained analyzer
- Analyzing segments predictability


#### [Prediction intervals](https://github.com/etna-team/etna/tree/master/examples/306-prediction_intervals.ipynb)
- Loading and preparing data
- Estimating intervals using builtin method
Expand All @@ -195,6 +193,18 @@ We have prepared a set of tutorials for an easy introduction:
- Non-parametric method
- Estimating historical residuals

#### [Working with misaligned data](https://github.com/etna-team/etna/tree/master/examples/307-working_with_misaligned_data.ipynb)
- Loading data
- Preparing data
- Using `TSDataset.create_from_misaligned`
- Using `infer_alignment`
- Using `apply_alignment`
- Using `make_timestamp_df_from_alignment`
- Examples with regular data
- Forecasting with `CatBoostMultiSegmentModel`
- Utilizing old data with `CatBoostMultiSegmentModel`
- Forecasting with `ProphetModel`
- Working with irregular data

## Scripts

Expand Down

0 comments on commit 0b2112f

Please sign in to comment.