Add multiseries support to graph_prediction_vs_actual_over_time#4284
Merged
MichaelFu512 merged 15 commits intomainfrom Aug 21, 2023
Merged
Add multiseries support to graph_prediction_vs_actual_over_time#4284MichaelFu512 merged 15 commits intomainfrom
MichaelFu512 merged 15 commits intomainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4284 +/- ##
=======================================
+ Coverage 99.7% 99.7% +0.1%
=======================================
Files 355 355
Lines 39096 39154 +58
=======================================
+ Hits 38976 39034 +58
Misses 120 120
|
jeremyliweishih
requested changes
Aug 21, 2023
Collaborator
jeremyliweishih
left a comment
There was a problem hiding this comment.
One small testing change but LGTM otherwise.
| fig.update_yaxes(title_text=y.name) | ||
| if single_series is not None: | ||
| fig.update_layout( | ||
| height=600, |
Collaborator
There was a problem hiding this comment.
is there any autosizing we can take advantage of? Also not sure if we need the single_series case: can it just match what we already had before for time series?
Contributor
Author
There was a problem hiding this comment.
Is there any autosizing we can take advantage of?
- For python plotly, it doesn't look like there's any autosizing besides doing what I did in line 490 (though correct me if I'm wrong). If I left the parameters blank for the multiseries graph (i.e. don't define x and y) and let it use the default values the graph looks really squished.
- For single series though I can probably leave the parameters blank since it is only one graph.
Also not sure if we need the single_series case: can it just match what we already had before for time series?
- The issue is that for single_series case I want the data that corresponds to that single series.
- In the before case for time series, y is taken from
data["target"]whereas for single series I want to take it fromcurr_df["target"]wherecurr_df = data[data["series_id"] == single_series] - If I wanted to do that with the before code, I'd probably have to add more
ifstatements and such so it made more sense to me to have it included with the multiseries case. - Also I'd like for the single series plot to have a different title than the time series plot.
- In the before case for time series, y is taken from
Collaborator
There was a problem hiding this comment.
cool - thanks for the explanation. Works for me!
eccabay
approved these changes
Aug 21, 2023
Contributor
eccabay
left a comment
There was a problem hiding this comment.
Thanks! Just a docstring comment
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.
Pull Request Description
Closes #4285
A small snippet of what
graph_prediction_vs_actual_over_timelooks like for multiseries: