-
Notifications
You must be signed in to change notification settings - Fork 861
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
[timeseries] Add method for plotting forecasts #3889
Conversation
Job PR-3889-4d291bb is done. |
Job PR-3889-ac8bbbd is done. |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Especially the tests :)
if item_ids is None: | ||
item_ids = list(np.random.choice(data.item_ids, size=min(max_num_item_ids, data.num_items), replace=False)) | ||
else: | ||
item_ids = list(item_ids)[:max_num_item_ids] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So If I give you 9 item_ids you will not plot the 9th... The item_ids
docstring does not spell that out very well, and I would expect this not to be the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the docstrings to communicate this more clearly.
I have two arguments in favor of keeping the current argument name & effect:
- I think that limiting the max number of plots to
max_num_item_ids=8
by default is a reasonable safeguard in case the user calls
predictor.plot(data, item_ids=data.item_ids)
which may generate thousands of plots and kill the jupyter kernel.
2. If max_num_item_ids
only applies to the case when item_ids=None
, we'll need to rename to it something like max_num_random_item_ids
or max_num_default_item_ids
, which doesn't sound as intuitive as the current name.
9dfa0cb
to
e275318
Compare
Job PR-3889-db08c13 is done. |
[timeseries] Add method for plotting forecasts (autogluon#3889) [timeseries] Add support for categorical covariates (autogluon#3874)
…tch-4 * 'master' of https://github.com/awslabs/autogluon: (46 commits) [core] move transformers to setup_utils, bump dependency version (autogluon#3984) [AutoMM] Fix one lightning upgrade issue (autogluon#3991) [CI][Feature] Create a package version table (autogluon#3972) [v.1.1][Upgrade] PyTorch 2.1 and CUDA 12.1 upgrade (autogluon#3982) [WIP] Code implementation of Conv-LoRA (autogluon#3933) [timeseries] Ensure that all metrics handle missing values in the target (autogluon#3966) [timeseries] Fix path and device bugs (autogluon#3979) [AutoMM]Remove grounding-dino (autogluon#3974) [Docs] Update install modules content (autogluon#3976) Add note on pd.to_datetime (autogluon#3975) [AutoMM] Improve DINO performance (autogluon#3970) Minor correction in differ to pick correct environment (autogluon#3968) Fix windows python 3.11 issue by removing ray (autogluon#3956) [CI][Feature] Package Version Comparator (autogluon#3962) [timeseries] Add support for categorical covariates (autogluon#3874) [timeseries] Add method for plotting forecasts (autogluon#3889) Update conf.py copyright to reflect current year (autogluon#3932) [Timeseries][CI]Refactor CI to skip AutoMM and Tabular tests w.r.t timeseries changes (autogluon#3942) Fix HPO crash in memory check (autogluon#3931) [AutoMM][CI] Capping scikit-learn to avoid HPO test failure (autogluon#3947) ...
Description of changes:
TimeSeriesPredictor.plot()
that can plot time series (potentially, with forecasts) usingmatplotlib
.plot
method for visualizing forecasts.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.