diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a37947e0..74af98486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - Implementation of PatchTS model ([#1277](https://github.com/tinkoff-ai/etna/pull/1277)) - Add `quickstart` notebook, add `mechanics_of_forecasting` notebook ([#1343](https://github.com/tinkoff-ai/etna/pull/1343)) +- Add gallery of tutorials divided by level ([#1354](https://github.com/tinkoff-ai/etna/pull/1354)) ### Changed - diff --git a/README.md b/README.md index f5b1edaa1..47423b048 100644 --- a/README.md +++ b/README.md @@ -177,25 +177,25 @@ To set up a configuration for your project you should create a `.etna` file at t We have also prepared a set of tutorials for an easy introduction: -| Notebook | Interactive launch | -|:----------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------:| -| [Get started](https://github.com/tinkoff-ai/etna/tree/master/examples/01-get_started.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/01-get_started.ipynb) | -| [Backtest](https://github.com/tinkoff-ai/etna/tree/master/examples/02-backtest.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/02-backtest.ipynb) | -| [EDA](https://github.com/tinkoff-ai/etna/tree/master/examples/03-EDA.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/03-EDA.ipynb) | -| [Regressors and exogenous data](https://github.com/tinkoff-ai/etna/tree/master/examples/04-exogenous_data.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/04-exogenous_data.ipynb) | -| [Custom model and transform](https://github.com/tinkoff-ai/etna/tree/master/examples/05-custom_transform_and_model.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/05-custom_transform_and_model.ipynb) | -| [Deep learning models](https://github.com/tinkoff-ai/etna/tree/master/examples/06-NN_examples.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/06-NN_examples.ipynb) | -| [Ensembles](https://github.com/tinkoff-ai/etna/tree/master/examples/07-ensembles.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/07-ensembles.ipynb) | -| [Outliers](https://github.com/tinkoff-ai/etna/tree/master/examples/08-outliers.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/08-outliers.ipynb) | -| [Forecasting strategies](https://github.com/tinkoff-ai/etna/tree/master/examples/09-forecasting_strategies.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/09-forecasting_strategies.ipynb) | -| [Forecast interpretation](https://github.com/tinkoff-ai/etna/tree/master/examples/10-forecast_interpretation.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/10-forecast_interpretation.ipynb) | -| [Clustering](https://github.com/tinkoff-ai/etna/tree/master/examples/11-clustering.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/11-clustering.ipynb) | -| [AutoML](https://github.com/tinkoff-ai/etna/tree/master/examples/12-automl.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/12-automl.ipynb) | -| [Inference: using saved pipeline on a new data](https://github.com/tinkoff-ai/etna/tree/master/examples/13-inference.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/13-inference.ipynb) | -| [Hierarchical time series](https://github.com/tinkoff-ai/etna/blob/master/examples/14-hierarchical_pipeline.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/14-hierarchical_pipeline.ipynb) | -| [Classification](https://github.com/tinkoff-ai/etna/blob/master/examples/15-classification.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/15-classification.ipynb) | -| [Feature selection](https://github.com/tinkoff-ai/etna/blob/master/examples/16-feature_selection.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/16-feature_selection.ipynb) | -| [Mechanics of forecasting](https://github.com/tinkoff-ai/etna/blob/master/examples/17-mechanics_of_forecasting.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/17-mechanics_of_forecasting.ipynb) | +| Notebook | Interactive launch | +|:-----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------:| +| [Get started](https://github.com/tinkoff-ai/etna/tree/master/examples/101-get_started.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/101-get_started.ipynb) | +| [Backtest](https://github.com/tinkoff-ai/etna/tree/master/examples/102-backtest.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/102-backtest.ipynb) | +| [EDA](https://github.com/tinkoff-ai/etna/tree/master/examples/103-EDA.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/103-EDA.ipynb) | +| [Regressors and exogenous data](https://github.com/tinkoff-ai/etna/tree/master/examples/201-exogenous_data.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/201-exogenous_data.ipynb) | +| [Deep learning models](https://github.com/tinkoff-ai/etna/tree/master/examples/202-NN_examples.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/202-NN_examples.ipynb) | +| [Ensembles](https://github.com/tinkoff-ai/etna/tree/master/examples/303-ensembles.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/203-ensembles.ipynb) | +| [Outliers](https://github.com/tinkoff-ai/etna/tree/master/examples/204-outliers.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/204-outliers.ipynb) | +| [AutoML](https://github.com/tinkoff-ai/etna/tree/master/examples/205-automl.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/205-automl.ipynb) | +| [Clustering](https://github.com/tinkoff-ai/etna/tree/master/examples/206-clustering.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/206-clustering.ipynb) | +| [Feature selection](https://github.com/tinkoff-ai/etna/blob/master/examples/207-feature_selection.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/207-feature_selection.ipynb) | +| [Forecasting strategies](https://github.com/tinkoff-ai/etna/tree/master/examples/208-forecasting_strategies.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/208-forecasting_strategies.ipynb) | +| [Mechanics of forecasting](https://github.com/tinkoff-ai/etna/blob/master/examples/209-mechanics_of_forecasting.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/209-mechanics_of_forecasting.ipynb) | +| [Custom model and transform](https://github.com/tinkoff-ai/etna/tree/master/examples/301-custom_transform_and_model.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/301-custom_transform_and_model.ipynb) | +| [Inference: using saved pipeline on a new data](https://github.com/tinkoff-ai/etna/tree/master/examples/302-inference.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/302-inference.ipynb) | +| [Hierarchical time series](https://github.com/tinkoff-ai/etna/blob/master/examples/303-hierarchical_pipeline.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/303-hierarchical_pipeline.ipynb) | +| [Forecast interpretation](https://github.com/tinkoff-ai/etna/tree/master/examples/304-forecast_interpretation.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/304-forecast_interpretation.ipynb) | +| [Classification](https://github.com/tinkoff-ai/etna/blob/master/examples/305-classification.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/305-classification.ipynb) | ## Documentation diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css new file mode 100644 index 000000000..1ca8c0b35 --- /dev/null +++ b/docs/source/_static/css/custom.css @@ -0,0 +1,12 @@ +#tutorials .card-tutorial-basic { + background-color: var(--pst-color-primary); +} + +#tutorials .card-tutorial-intermediate { + background-color: var(--pst-color-secondary); +} + +#tutorials .card-tutorial-advanced { + background-color: var(--pst-color-target); +} + diff --git a/docs/source/conf.py b/docs/source/conf.py index 828097e85..541426a2c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -50,6 +50,7 @@ extensions = [ "nbsphinx", # integration of notebooks "myst_parser", # markdown support + "sphinx_design", # for ready styling blocks "sphinx.ext.napoleon", # support for NumPy and Google style docstrings "sphinx.ext.autodoc", # include documentation from docstrings "sphinx.ext.autosummary", # generate autodoc summaries @@ -81,6 +82,9 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] +html_css_files = [ + "css/custom.css", +] html_logo = "_static/etna_logo.png" html_favicon = "_static/etna_favicon.ico" diff --git a/docs/source/tutorials.rst b/docs/source/tutorials.rst index 2ed372e71..8f3d1bb79 100644 --- a/docs/source/tutorials.rst +++ b/docs/source/tutorials.rst @@ -3,24 +3,175 @@ Tutorials ========== -.. toctree:: - :titlesonly: - :maxdepth: 1 - - tutorials/01-get_started - tutorials/02-backtest - tutorials/03-EDA - tutorials/04-exogenous_data - tutorials/05-custom_transform_and_model - tutorials/06-NN_examples - tutorials/07-ensembles - tutorials/08-outliers - tutorials/09-forecasting_strategies - tutorials/10-forecast_interpretation - tutorials/11-clustering - tutorials/12-automl - tutorials/13-inference - tutorials/14-hierarchical_pipeline - tutorials/15-classification - tutorials/16-feature_selection - tutorials/17-mechanics_of_forecasting +There are multiple tutorials for different use cases divided by proficiency level. + +Basic +----- + +.. grid:: 1 2 2 2 + :gutter: 2 + + .. grid-item-card:: Get Started + :text-align: center + :link: tutorials/101-get_started + :link-type: doc + :class-header: card-tutorial-basic + + ^^^ + Get started with the library + + .. grid-item-card:: Backtest + :text-align: center + :link: tutorials/102-backtest + :link-type: doc + :class-header: card-tutorial-basic + + ^^^ + How to evaluate a pipeline + + .. grid-item-card:: Exploratory data analysis + :text-align: center + :link: tutorials/103-EDA + :link-type: doc + :class-header: card-tutorial-basic + + ^^^ + How to make EDA using the library + +Intermediate +------------ + +.. grid:: 1 2 2 2 + :gutter: 2 + + .. grid-item-card:: Regressors and exogenous data + :text-align: center + :link: tutorials/201-exogenous_data + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to use exogenous data in a pipeline + + .. grid-item-card:: Deep learning examples + :text-align: center + :link: tutorials/202-NN_examples + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to use neural network models + + .. grid-item-card:: Ensembles + :text-align: center + :link: tutorials/203-ensembles + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to ensemble pipelines + + .. grid-item-card:: Outliers + :text-align: center + :link: tutorials/204-outliers + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to handle outliers + + .. grid-item-card:: AutoML + :text-align: center + :link: tutorials/205-automl + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to work with AutoML utilities + + .. grid-item-card:: Clustering + :text-align: center + :link: tutorials/206-clustering + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to perform time series clustering + + .. grid-item-card:: Feature selection + :text-align: center + :link: tutorials/207-feature_selection + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to perform feature selection + + .. grid-item-card:: Forecasting strategies + :text-align: center + :link: tutorials/208-forecasting_strategies + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How to use different forecasting strategies + + .. grid-item-card:: Mechanics of forecasting + :text-align: center + :link: tutorials/209-mechanics_of_forecasting + :link-type: doc + :class-header: card-tutorial-intermediate + + ^^^ + How pipelines are making forecasts under the hood + +Advanced +-------- + +.. grid:: 1 2 2 2 + :gutter: 2 + + .. grid-item-card:: Custom model and transform + :text-align: center + :link: tutorials/301-custom_transform_and_model + :link-type: doc + :class-header: card-tutorial-advanced + + ^^^ + How to define your own model and transform + + .. grid-item-card:: Inference + :text-align: center + :link: tutorials/302-inference + :link-type: doc + :class-header: card-tutorial-advanced + + ^^^ + How to save pipeline and use it later on new data + + .. grid-item-card:: Hierarchical time series + :text-align: center + :link: tutorials/303-hierarchical_pipeline + :link-type: doc + :class-header: card-tutorial-advanced + + ^^^ + How to work with hierarchical time series + + .. grid-item-card:: Forecasting interpretation + :text-align: center + :link: tutorials/304-forecasting_interpretation + :link-type: doc + :class-header: card-tutorial-advanced + + ^^^ + How to perform forecast decomposition for interpretation + + .. grid-item-card:: Classification + :text-align: center + :link: tutorials/305-classification + :link-type: doc + :class-header: card-tutorial-advanced + + ^^^ + How to perform time series classification diff --git a/examples/01-get_started.ipynb b/examples/101-get_started.ipynb similarity index 99% rename from examples/01-get_started.ipynb rename to examples/101-get_started.ipynb index d2595fdbb..7a8917e7f 100644 --- a/examples/01-get_started.ipynb +++ b/examples/101-get_started.ipynb @@ -6,7 +6,7 @@ "source": [ "# Get started\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/01-get_started.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/101-get_started.ipynb)" ] }, { diff --git a/examples/02-backtest.ipynb b/examples/102-backtest.ipynb similarity index 99% rename from examples/02-backtest.ipynb rename to examples/102-backtest.ipynb index 45cb7b219..3c036fc12 100644 --- a/examples/02-backtest.ipynb +++ b/examples/102-backtest.ipynb @@ -7,7 +7,7 @@ "source": [ "# Backtest: validation on historical data\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/02-backtest.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/102-backtest.ipynb)" ] }, { diff --git a/examples/03-EDA.ipynb b/examples/103-EDA.ipynb similarity index 99% rename from examples/03-EDA.ipynb rename to examples/103-EDA.ipynb index 2d20d075a..9eaa12978 100644 --- a/examples/03-EDA.ipynb +++ b/examples/103-EDA.ipynb @@ -7,7 +7,7 @@ "source": [ "# EDA\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/03-EDA.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/103-EDA.ipynb)" ] }, { diff --git a/examples/04-exogenous_data.ipynb b/examples/201-exogenous_data.ipynb similarity index 99% rename from examples/04-exogenous_data.ipynb rename to examples/201-exogenous_data.ipynb index 1b7b2adce..2e3891759 100644 --- a/examples/04-exogenous_data.ipynb +++ b/examples/201-exogenous_data.ipynb @@ -10,7 +10,7 @@ "source": [ "# Regressors and exogenous data\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/04-exogenous_data.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/201-exogenous_data.ipynb)" ] }, { diff --git a/examples/06-NN_examples.ipynb b/examples/202-NN_examples.ipynb similarity index 99% rename from examples/06-NN_examples.ipynb rename to examples/202-NN_examples.ipynb index 89788c18f..d6f9d627f 100644 --- a/examples/06-NN_examples.ipynb +++ b/examples/202-NN_examples.ipynb @@ -7,7 +7,7 @@ "source": [ "# Deep learning examples\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/06-NN_examples.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/202-NN_examples.ipynb)" ] }, { diff --git a/examples/07-ensembles.ipynb b/examples/203-ensembles.ipynb similarity index 99% rename from examples/07-ensembles.ipynb rename to examples/203-ensembles.ipynb index b4e3a13e3..1f8cdf283 100644 --- a/examples/07-ensembles.ipynb +++ b/examples/203-ensembles.ipynb @@ -7,7 +7,7 @@ "source": [ "# Ensembles\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/07-ensembles.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/203-ensembles.ipynb)" ] }, { diff --git a/examples/08-outliers.ipynb b/examples/204-outliers.ipynb similarity index 99% rename from examples/08-outliers.ipynb rename to examples/204-outliers.ipynb index 75172e41a..d2614b683 100644 --- a/examples/08-outliers.ipynb +++ b/examples/204-outliers.ipynb @@ -7,7 +7,7 @@ "source": [ "# Outliers\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/08-outliers.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/204-outliers.ipynb)" ] }, { diff --git a/examples/12-automl.ipynb b/examples/205-automl.ipynb similarity index 99% rename from examples/12-automl.ipynb rename to examples/205-automl.ipynb index eb39e6e7a..deab0af7d 100644 --- a/examples/12-automl.ipynb +++ b/examples/205-automl.ipynb @@ -7,7 +7,7 @@ "source": [ "# AutoML\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/12-automl.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/205-automl.ipynb)" ] }, { diff --git a/examples/11-clustering.ipynb b/examples/206-clustering.ipynb similarity index 99% rename from examples/11-clustering.ipynb rename to examples/206-clustering.ipynb index 3b5a8c0ff..208022f74 100644 --- a/examples/11-clustering.ipynb +++ b/examples/206-clustering.ipynb @@ -7,7 +7,7 @@ "source": [ "# Clustering\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/11-clustering.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/206-clustering.ipynb)" ] }, { diff --git a/examples/16-feature_selection.ipynb b/examples/207-feature_selection.ipynb similarity index 99% rename from examples/16-feature_selection.ipynb rename to examples/207-feature_selection.ipynb index f1eb6fc23..b15fe17c0 100644 --- a/examples/16-feature_selection.ipynb +++ b/examples/207-feature_selection.ipynb @@ -6,7 +6,7 @@ "source": [ "# Feature selection\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/16-feature_selection.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/207-feature_selection.ipynb)" ] }, { diff --git a/examples/09-forecasting_strategies.ipynb b/examples/208-forecasting_strategies.ipynb similarity index 99% rename from examples/09-forecasting_strategies.ipynb rename to examples/208-forecasting_strategies.ipynb index 93568c156..ab9a8eb99 100644 --- a/examples/09-forecasting_strategies.ipynb +++ b/examples/208-forecasting_strategies.ipynb @@ -6,7 +6,7 @@ "source": [ "# Forecasting strategies\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/09-forecasting_strategies.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/208-forecasting_strategies.ipynb)" ] }, { diff --git a/examples/17-mechanics_of_forecasting.ipynb b/examples/209-mechanics_of_forecasting.ipynb similarity index 99% rename from examples/17-mechanics_of_forecasting.ipynb rename to examples/209-mechanics_of_forecasting.ipynb index 670aa9322..a8ac22a67 100644 --- a/examples/17-mechanics_of_forecasting.ipynb +++ b/examples/209-mechanics_of_forecasting.ipynb @@ -6,7 +6,7 @@ "source": [ "# Mechanics of forecasting\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/17-mechanics-of-forecasting.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/209-mechanics-of-forecasting.ipynb)" ] }, { diff --git a/examples/05-custom_transform_and_model.ipynb b/examples/301-custom_transform_and_model.ipynb similarity index 99% rename from examples/05-custom_transform_and_model.ipynb rename to examples/301-custom_transform_and_model.ipynb index 44070bf5d..4a432c301 100644 --- a/examples/05-custom_transform_and_model.ipynb +++ b/examples/301-custom_transform_and_model.ipynb @@ -8,7 +8,7 @@ "source": [ "# Custom model and transform\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/05-custom_transform_and_model.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/301-custom_transform_and_model.ipynb)" ] }, { diff --git a/examples/13-inference.ipynb b/examples/302-inference.ipynb similarity index 99% rename from examples/13-inference.ipynb rename to examples/302-inference.ipynb index df61adf6f..bb667a19e 100644 --- a/examples/13-inference.ipynb +++ b/examples/302-inference.ipynb @@ -7,7 +7,7 @@ "source": [ "# Inference: using saved pipeline on a new data\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/13-inference.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/302-inference.ipynb)" ] }, { diff --git a/examples/14-hierarchical_pipeline.ipynb b/examples/303-hierarchical_pipeline.ipynb similarity index 99% rename from examples/14-hierarchical_pipeline.ipynb rename to examples/303-hierarchical_pipeline.ipynb index 0722155e9..713716c7c 100644 --- a/examples/14-hierarchical_pipeline.ipynb +++ b/examples/303-hierarchical_pipeline.ipynb @@ -6,7 +6,7 @@ "source": [ "# Hierarchical time series\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/14-hierarchical_pipeline.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/303-hierarchical_pipeline.ipynb)" ] }, { diff --git a/examples/10-forecasting_interpretation.ipynb b/examples/304-forecasting_interpretation.ipynb similarity index 99% rename from examples/10-forecasting_interpretation.ipynb rename to examples/304-forecasting_interpretation.ipynb index 7180b350a..1467fe146 100644 --- a/examples/10-forecasting_interpretation.ipynb +++ b/examples/304-forecasting_interpretation.ipynb @@ -6,7 +6,7 @@ "source": [ "# Forecasting interpretation\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/10-forecasting_interpretation.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/302-forecasting_interpretation.ipynb)" ] }, { diff --git a/examples/15-classification.ipynb b/examples/305-classification.ipynb similarity index 99% rename from examples/15-classification.ipynb rename to examples/305-classification.ipynb index b1c4b943c..d1b202d5f 100644 --- a/examples/15-classification.ipynb +++ b/examples/305-classification.ipynb @@ -7,7 +7,7 @@ "source": [ "# Classification\n", "\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/15-classification.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/305-classification.ipynb)" ] }, { diff --git a/examples/README.md b/examples/README.md index b6afbe517..9a0a90948 100644 --- a/examples/README.md +++ b/examples/README.md @@ -6,7 +6,9 @@ We have prepared a set of tutorials for an easy introduction: ## Tutorials -### 01. [Get started](https://github.com/tinkoff-ai/etna/tree/master/examples/01-get_started.ipynb) +### Basic + +#### [Get started](https://github.com/tinkoff-ai/etna/tree/master/examples/101-get_started.ipynb) - Loading dataset - Plotting - Forecasting single time series @@ -15,14 +17,14 @@ We have prepared a set of tutorials for an easy introduction: - Catboost - Forecasting multiple time series -### 02. [Backtest](https://github.com/tinkoff-ai/etna/tree/master/examples/02-backtest.ipynb) +#### [Backtest](https://github.com/tinkoff-ai/etna/tree/master/examples/102-backtest.ipynb) - What is backtest and how it works - How to run a validation - Backtest with fold masks - Validation visualisation - Metrics visualisation -### 03. [EDA](https://github.com/tinkoff-ai/etna/tree/master/examples/03-EDA.ipynb) +#### [EDA](https://github.com/tinkoff-ai/etna/tree/master/examples/103-EDA.ipynb) - Loading dataset - Visualization - Plotting time series @@ -39,7 +41,9 @@ We have prepared a set of tutorials for an easy introduction: - Change points plot - Interactive change points plot -### 04. [Regressors and exogenous data](https://github.com/tinkoff-ai/etna/tree/master/examples/04-exogenous_data.ipynb) +## Intermediate + +#### [Regressors and exogenous data](https://github.com/tinkoff-ai/etna/tree/master/examples/201-exogenous_data.ipynb) - What is regressor? - What is additional data? - Dataset @@ -47,16 +51,7 @@ We have prepared a set of tutorials for an easy introduction: - EDA - Forecasting with regressors -### 05. [Custom model and transform](https://github.com/tinkoff-ai/etna/tree/master/examples/05-custom_transform_and_model.ipynb) -- What is transform and how it works -- Custom transform - - Per-segment custom transform - - Multi-segment custom transform -- Custom model - - Creating a new model from scratch - - Creating a new model using sklearn interface - -### 06. [Deep learning models](https://github.com/tinkoff-ai/etna/tree/master/examples/06-NN_examples.ipynb) +#### [Deep learning models](https://github.com/tinkoff-ai/etna/tree/master/examples/202-NN_examples.ipynb) - Loading dataset - Architecture - Testing models @@ -67,7 +62,7 @@ We have prepared a set of tutorials for an easy introduction: - N-BEATS Model - PatchTS Model -### 07. [Ensembles](https://github.com/tinkoff-ai/etna/tree/master/examples/07-ensembles.ipynb) +#### [Ensembles](https://github.com/tinkoff-ai/etna/tree/master/examples/203-ensembles.ipynb) - Loading dataset - Building pipelines - Ensembles @@ -75,7 +70,7 @@ We have prepared a set of tutorials for an easy introduction: - `StackingEnsamble` - Results -### 08. [Outliers](https://github.com/tinkoff-ai/etna/tree/master/examples/08-outliers.ipynb) +#### [Outliers](https://github.com/tinkoff-ai/etna/tree/master/examples/204-outliers.ipynb) - Loading dataset - Point outliers - Median method @@ -85,27 +80,16 @@ We have prepared a set of tutorials for an easy introduction: - Interactive visualization - Outliers imputation -### 09. [Forecasting strategies](https://github.com/tinkoff-ai/etna/tree/master/examples/09-forecasting_strategies.ipynb) -- Loading dataset -- Recursive strategy -- Direct strategy - - `Pipeline` - - `DirectEnsemble` +#### [AutoML](https://github.com/tinkoff-ai/etna/tree/master/examples/205-automl.ipynb) +- Hyperparameters tuning + - How `Tune` works + - Example +- General AutoML + - How `Auto` works + - Example - Summary -### 10. [Forecast interpretation](https://github.com/tinkoff-ai/etna/tree/master/examples/10-forecast_interpretation.ipynb) -- Loading dataset -- Forecast decomposition - - CatBoost - - SARIMAX - - BATS - - In-sample and out-of-sample decomposition -- Accessing target components -- Regressors relevance - - Feature relevance - - Components relevance - -### 11. [Clustering](https://github.com/tinkoff-ai/etna/tree/master/examples/11-clustering.ipynb) +#### [Clustering](https://github.com/tinkoff-ai/etna/tree/master/examples/206-clustering.ipynb) - Generating dataset - Distances - Clustering @@ -117,16 +101,44 @@ We have prepared a set of tutorials for an easy introduction: - Custom Distance implementation - Custom Distance in clustering -### 12. [AutoML](https://github.com/tinkoff-ai/etna/tree/master/examples/12-automl.ipynb) -- Hyperparameters tuning - - How `Tune` works - - Example -- General AutoML - - How `Auto` works - - Example +#### [Feature selection](https://github.com/tinkoff-ai/etna/tree/master/examples/207-feature_selection.ipynb) +- Loading dataset +- Feature selection methods + - Intro to feature selection + - `TreeFeatureSelectionTransform` + - `GaleShapleyFeatureSelectionTransform` + - `MRMRFeatureSelectionTransform` +- Summary + +#### [Forecasting strategies](https://github.com/tinkoff-ai/etna/tree/master/examples/208-forecasting_strategies.ipynb) +- Loading dataset +- Recursive strategy +- Direct strategy + - `Pipeline` + - `DirectEnsemble` +- Summary + + +#### [Mechanics of forecasting](https://github.com/tinkoff-ai/etna/tree/master/examples/209-mechanics_of_forecasting.ipynb) +- Loading dataset +- Forecasting + - Context-free models + - Context-required models + - ML models - Summary -### 13. [Inference: using saved pipeline on a new data](https://github.com/tinkoff-ai/etna/tree/master/examples/13-inference.ipynb) +### Advanced + +#### [Custom model and transform](https://github.com/tinkoff-ai/etna/tree/master/examples/301-custom_transform_and_model.ipynb) +- What is transform and how it works +- Custom transform + - Per-segment custom transform + - Multi-segment custom transform +- Custom model + - Creating a new model from scratch + - Creating a new model using sklearn interface + +#### [Inference: using saved pipeline on a new data](https://github.com/tinkoff-ai/etna/tree/master/examples/302-inference.ipynb) - Preparing data - Fitting and saving pipeline - Fitting pipeline @@ -136,7 +148,7 @@ We have prepared a set of tutorials for an easy introduction: - Loading pipeline - Forecast on a new data -### 14. [Hierarchical time series](https://github.com/tinkoff-ai/etna/tree/master/examples/14-hierarchical_pipeline.ipynb) +#### [Hierarchical time series](https://github.com/tinkoff-ai/etna/tree/master/examples/303-hierarchical_pipeline.ipynb) - Hierarchical time series - Preparing dataset - Manually setting hierarchical structure @@ -146,7 +158,19 @@ We have prepared a set of tutorials for an easy introduction: - Top-down approach - Exogenous variables for hierarchical forecasts -### 15. [Classification](https://github.com/tinkoff-ai/etna/tree/master/examples/15-classification.ipynb) +#### [Forecast interpretation](https://github.com/tinkoff-ai/etna/tree/master/examples/304-forecast_interpretation.ipynb) +- Loading dataset +- Forecast decomposition + - CatBoost + - SARIMAX + - BATS + - In-sample and out-of-sample decomposition +- Accessing target components +- Regressors relevance + - Feature relevance + - Components relevance + +#### [Classification](https://github.com/tinkoff-ai/etna/tree/master/examples/305-classification.ipynb) - Classification - Loading dataset - Feature extraction @@ -156,25 +180,8 @@ We have prepared a set of tutorials for an easy introduction: - Loading pretrained analyzer - Analyzing segments predictability -### 16. [Feature selection](https://github.com/tinkoff-ai/etna/tree/master/examples/16-feature_selection.ipynb) -- Loading dataset -- Feature selection methods - - Intro to feature selection - - `TreeFeatureSelectionTransform` - - `GaleShapleyFeatureSelectionTransform` - - `MRMRFeatureSelectionTransform` -- Summary - -### 17. [Mechanics of forecasting](https://github.com/tinkoff-ai/etna/tree/master/examples/17-mechanics_of_forecasting.ipynb) -- Loading dataset -- Forecasting - - Context-free models - - Context-required models - - ML models -- Summary - ## Scripts -### 01. Hyperparameter search +### Hyperparameter search - [Optuna](https://github.com/tinkoff-ai/etna/tree/master/examples/optuna) - [WandB sweeps](https://github.com/tinkoff-ai/etna/tree/master/examples/wandb/sweeps) example based on [Hydra](https://hydra.cc/) diff --git a/poetry.lock b/poetry.lock index aa869f236..8dbae8acb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5072,6 +5072,30 @@ docs = ["sphinxcontrib-websupport"] lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] +[[package]] +name = "sphinx-design" +version = "0.5.0" +description = "A sphinx extension for designing beautiful, view size responsive web components." +category = "main" +optional = true +python-versions = ">=3.8" +files = [ + {file = "sphinx_design-0.5.0-py3-none-any.whl", hash = "sha256:1af1267b4cea2eedd6724614f19dcc88fe2e15aff65d06b2f6252cee9c4f4c1e"}, + {file = "sphinx_design-0.5.0.tar.gz", hash = "sha256:e8e513acea6f92d15c6de3b34e954458f245b8e761b45b63950f65373352ab00"}, +] + +[package.dependencies] +sphinx = ">=5,<8" + +[package.extras] +code-style = ["pre-commit (>=3,<4)"] +rtd = ["myst-parser (>=1,<3)"] +testing = ["myst-parser (>=1,<3)", "pytest (>=7.1,<8.0)", "pytest-cov", "pytest-regressions"] +theme-furo = ["furo (>=2023.7.0,<2023.8.0)"] +theme-pydata = ["pydata-sphinx-theme (>=0.13.0,<0.14.0)"] +theme-rtd = ["sphinx-rtd-theme (>=1.0,<2.0)"] +theme-sbt = ["sphinx-book-theme (>=1.0,<2.0)"] + [[package]] name = "sphinx-mathjax-offline" version = "0.0.2" @@ -6220,10 +6244,10 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [extras] all = ["optuna", "prophet", "pytorch-forecasting", "pytorch-lightning", "pyts", "sqlalchemy", "statsforecast", "torch", "tsfresh", "wandb"] -all-dev = ["GitPython", "Sphinx", "black", "click", "click", "codespell", "coverage", "flake8", "flake8-bugbear", "flake8-comprehensions", "flake8-docstrings", "isort", "jupyter", "mypy", "myst-parser", "nbconvert", "nbqa", "nbsphinx", "optuna", "pep8-naming", "prophet", "pydata-sphinx-theme", "pytest", "pytest-cov", "pytorch-forecasting", "pytorch-lightning", "pyts", "semver", "semver", "sphinx-mathjax-offline", "sqlalchemy", "statsforecast", "torch", "tsfresh", "types-PyYAML", "types-setuptools", "wandb"] +all-dev = ["GitPython", "Sphinx", "black", "click", "click", "codespell", "coverage", "flake8", "flake8-bugbear", "flake8-comprehensions", "flake8-docstrings", "isort", "jupyter", "mypy", "myst-parser", "nbconvert", "nbqa", "nbsphinx", "optuna", "pep8-naming", "prophet", "pydata-sphinx-theme", "pytest", "pytest-cov", "pytorch-forecasting", "pytorch-lightning", "pyts", "semver", "semver", "sphinx-design", "sphinx-mathjax-offline", "sqlalchemy", "statsforecast", "torch", "tsfresh", "types-PyYAML", "types-setuptools", "wandb"] auto = ["optuna", "sqlalchemy"] classification = ["pyts", "tsfresh"] -docs = ["GitPython", "Sphinx", "myst-parser", "nbsphinx", "pydata-sphinx-theme", "sphinx-mathjax-offline"] +docs = ["GitPython", "Sphinx", "myst-parser", "nbsphinx", "pydata-sphinx-theme", "sphinx-design", "sphinx-mathjax-offline"] jupyter = ["black", "jupyter", "nbconvert"] prophet = ["prophet"] release = ["click", "semver"] @@ -6236,4 +6260,4 @@ wandb = ["wandb"] [metadata] lock-version = "2.0" python-versions = ">=3.8.0, <3.11.0" -content-hash = "63363c03e1decd77ffa7df02f34aa1db521c442fca0e301baf42c38b79abd239" +content-hash = "3d320a0513cc7d9c0d92a03cad7fd1589792d9b530ab2b838556e589d088a1d0" diff --git a/pyproject.toml b/pyproject.toml index 8af798708..4af0d7051 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,6 +90,7 @@ Sphinx = {version = "^6.2", optional = true} pydata-sphinx-theme = {version = "^0.13.3", optional = true} myst-parser = {version = "^1.0", optional = true} GitPython = {version = "^3.1.20", optional = true} +sphinx-design = {version = "^0.5.0", optional = true} pytest = {version = "^6.2", optional = true} coverage = {version = "^5.4", optional = true} @@ -127,7 +128,7 @@ classification = ["pyts", "tsfresh"] statsforecast = ["statsforecast"] # dev deps release = ["click", "semver"] -docs = ["Sphinx", "nbsphinx", "sphinx-mathjax-offline", "myst-parser", "GitPython", "pydata-sphinx-theme"] +docs = ["Sphinx", "nbsphinx", "sphinx-mathjax-offline", "myst-parser", "GitPython", "pydata-sphinx-theme", "sphinx-design"] tests = ["pytest-cov", "coverage", "pytest"] jupyter = ["jupyter", "nbconvert", "black"] style = ["black", "isort", "flake8", "pep8-naming", "flake8-docstrings", "mypy", "types-PyYAML", "codespell", "flake8-bugbear", "flake8-comprehensions", "types-setuptools", "nbqa"] @@ -147,7 +148,7 @@ all-dev = [ "wandb", "optuna", "sqlalchemy", "click", "semver", - "Sphinx", "nbsphinx", "sphinx-mathjax-offline", "myst-parser", "GitPython", "pydata-sphinx-theme", + "Sphinx", "nbsphinx", "sphinx-mathjax-offline", "myst-parser", "GitPython", "pydata-sphinx-theme", "sphinx-design", "pytest-cov", "coverage", "pytest", "black", "isort", "flake8", "pep8-naming", "flake8-docstrings", "mypy", "types-PyYAML", "codespell", "flake8-bugbear", "flake8-comprehensions", "types-setuptools", "nbqa", "click", "semver",