etna-team / etna

ETNA – Time-Series Library
https://etna.tinkoff.ru
Apache License 2.0
99 stars 5 forks source link

Add strategy description to `Pipeline` docs #372

Closed ArtemLiA closed 6 days ago

ArtemLiA commented 1 month ago

🚀 Feature Request

You should add in the api references a mention in the Pipeline documentation (link) that this class implements a direct forecasting strategy. And also, perhaps, you should add a reference to AutoRegressivePipeline, which implements recursive strategy.

Proposal

New documentation for the Pipeline class, which contains a reference to the implementation of a direct strategy and a link to the AutoRegressivePipeline.

An example of a new possible description: Pipeline of transforms with a final estimator, which implements direct forecasting strategy. If you are looking for recursive strategy implementation please see AutoRegressivePipeline.

Test cases

No response

Additional context

No response

d-a-bunin commented 1 month ago

Thank you for you suggestion! I think that such clarification could be useful in our documentation. But Pipeline isn't exactly a direct strategy.

In contrast in AutoRegressivePipeline:

If underlying model is autoregressive, the forecasting with Pipeline will be autoregressive. For example, it is the case SeasonalMovingAverageModel, SARIMAXModel.

If underlying model is regressive (sklearn-like), then Pipeline will make forecasting with simplified direct strategy where we use only one model.

ArtemLiA commented 1 month ago

Thanks for the detailed answer! I think we should specify all of the above in the Pipeline and AutoRegressivePipeline documentation.

As a possible option, I suggest the documentation descriptions below:

Pipeline Pipeline of transforms with a final estimator. Makes forecast in one iterations, during which applies transforms and makes call for forecast method for model.

AutoRegressivePipeline Pipeline that make regressive models autoregressive. Makes forecast in several iterations, on each of them apllies transforms and predict step values by using forecast method of model.

I think the same information should be added to the documentation of the forecast method for Pipeline and AutoRegressivePipeline.

I'm interested in contributing to this issue as a first-time contributor. Therefore, I would like to know if it is possible to update the documentation in accordance with the option I have proposed.

d-a-bunin commented 1 month ago

It isn't really convenient to add this information into forecast method because it is inherited from the base class. We could still add this info into class docstring.

It could also be possible to add "See also" block in Pipeline which mentions AutoRegressivePipeline and DirectEnsemble (and vice versa for other two classes). We could also add a reference to tutorial about strategy.

If you are going to take this issue: