Repository navigation
docs: add custom forecaster tutorial (#1128) - #1145
Open
charanteja25 wants to merge 2 commits into
Open
charanteja25 wants to merge 2 commits into
charanteja25 wants to merge 2 commits into
Conversation
Add a tutorial that shows how to write a custom Forecaster: the contract (hparams, is_fitted, fit, predict), a weekly profile example, use in ForecastingModel and CustomForecastingWorkflow, and a comparison with ConstantQuantileForecaster. Link it from the examples index. Signed-off-by: charanteja25 <charanteja.teja25@gmail.com>
2 of 11 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1128
Is your feature request related to a problem?
Yes, issue #1128. There is no tutorial that shows how to write a custom
Forecaster. The only custom example,examples/benchmarks/custom/custom_forecaster.py, is a template for the BEAM benchmark interface (BacktestForecasterMixin). A user who wants to add their own model to aForecastingModelhas to read the source code of the built-in forecasters.Describe the solution you'd like
A new tutorial,
examples/tutorials/custom_forecaster.py(with the paired.ipynb), that shows:Forecaster:hparams,is_fitted,fit,predict, and thequantilesandhorizonsfields.ForecastingModeland aCustomForecastingWorkflow.ConstantQuantileForecaster.The tutorial is linked in
docs/source/examples.rst(table and toctree), after "Custom Pipeline".Describe alternatives you've considered
examples/benchmarks/custom: it is about benchmarking, not about the model interface. The tutorial links to it.docs/source/user_guide/guides/: a tutorial with runnable code fits the other tutorials better. A short link from a guide can follow.Affected package(s)
Would this require breaking changes to the public API?
No. Only a new tutorial and one docs index entry.
Additional context
I read the issue as a request for a tutorial on the
Forecasterinterface (a custom model). If you meant something else, please tell me and I change it.Result on the Liander data used in the other tutorials (45 days of training, 36 h forecast):
This is one 36 h forecast window. It is an illustration for the tutorial, not a benchmark.
Notes for the review:
ForecastingModelholds back validation and test data by default. The weekly profile needs every week, so the tutorial setsDataSplitter(val_fraction=0.0, test_fraction=0.0)and explains why in a note.Checks:
poe all --checkpasses (ruff, ty, tests, doctests, REUSE, notebooks).test_datetime.pyandtest_evaluation_pipeline.py. They pass withTZ=UTC. They are not related to this change.