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

Add strategy description to Pipeline docs #372

Closed
ArtemLiA opened this issue May 30, 2024 · 3 comments · Fixed by #408
Closed

Add strategy description to Pipeline docs #372

ArtemLiA opened this issue May 30, 2024 · 3 comments · Fixed by #408
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@ArtemLiA
Copy link

🚀 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

@ArtemLiA ArtemLiA added the enhancement New feature or request label May 30, 2024
@d-a-bunin d-a-bunin added the documentation Improvements or additions to documentation label May 31, 2024
@d-a-bunin
Copy link
Collaborator

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

  • It trains one model;
  • It applies transforms only once in forecasting.
  • It makes only one call of forecast method for the underlying model.

In contrast in AutoRegressivePipeline:

  • It trains one model;
  • It applies transforms multiple times fore each iteration during forecasting.
  • It makes multiple calls for forecast method for the underlying model for each iteration.

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
Copy link
Author

ArtemLiA commented Jun 3, 2024

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
Copy link
Collaborator

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:

ArtemLiA added a commit to ArtemLiA/etna that referenced this issue Jun 22, 2024
ArtemLiA added a commit to ArtemLiA/etna that referenced this issue Jun 27, 2024
1) Wrap step param into double `` in the AutoRegressivePipeline docs.
2) Fix problem with linting.
3) Add a link to the pull request in the CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants