-
-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[WIP] Prototype for timeseries plots #1747
Conversation
Also, I guess I am not authorized to add labels. Hence, this and other PR is label-less. |
I would have the holdout be separate arrays, both x and y (and optionally observations which I hardly ever expect to be known in this setting). The reason for that is that while it is possible that both posterior predictive samples for observed data and out of sample posterior predictive samples (often called predicions or forecasts) are stored in the same array, I expect them being in different arrays to be more common. Moreover, going from single to multiple array is a "simple" slice operation whereas from multiple to single requires concatenation/stacking. |
@OriolAbril If the user split data into train and test, generating x_train, y_train, x_test, y_test.
We'll plot whatever information the user provides. This looks better to me. Need confirmation from @canyon289 @ahartikainen @OriolAbril on the design? |
Some points to be noted:
Started implementing it. One possible drawback of using this design is we would be generating so many of plotters arrays. Is this a concern with respect to complexity and maintainability ? |
It is getting a bit complex. So, I am assuming data is 1D for now. Will extend it for multi dim data once it is approved. |
Also not focusing on components plots for now. It is getting complex because there are a lot of cases to consider in this design. For example, when y_hat and y_forecast both are provided, we'll be plotting only y_forecast uncertainty (that is uncertainty in the forecasted data) and not y_hat (Uncertainty in the observed data). So, making the plotters to pass them to the backend function is getting complex. |
7fb4057
to
11f442e
Compare
Codecov Report
@@ Coverage Diff @@
## main #1747 +/- ##
==========================================
+ Coverage 91.18% 91.24% +0.05%
==========================================
Files 115 117 +2
Lines 12248 12433 +185
==========================================
+ Hits 11168 11344 +176
- Misses 1080 1089 +9
Continue to review full report at Codecov.
|
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.
added some nitpicky comments, mostly about numpydoc standard: https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard. They should not be too lengthy to take care of
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.
Looks good. Bokeh can be implemented later.
Also needs to be added to docs, now it has a docstring but won't appear on the website |
Description
This is another plot that I worked on under Google Summer of Code 2021. It includes overall time series and its components plots.
High level design:
Please see the docstring in
files changed
for a more detailed explanation of the user API.This plot successfully plots the overall time series for the matplotlib backend only. The added functionality is well-tested and nicely explained using examples in docstring.
Work yet to be done: Bokeh plot function is yet to be added may be in a different PR. Also, functionality to plot components is aimed to be covered in a future PR.
Plots:

Checklist