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 multiseries support to graph_prediction_vs_actual_over_time #4284

Merged
merged 15 commits into from Aug 21, 2023

Conversation

MichaelFu512
Copy link
Contributor

@MichaelFu512 MichaelFu512 commented Aug 21, 2023

Pull Request Description

Closes #4285

A small snippet of what graph_prediction_vs_actual_over_time looks like for multiseries:

Screen Shot 2023-08-21 at 9 24 40 AM

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #4284 (92e1b64) into main (53bd61b) will increase coverage by 0.1%.
The diff coverage is 100.0%.

@@           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             
Files Changed Coverage Δ
evalml/model_understanding/visualizations.py 100.0% <100.0%> (ø)
...s/model_understanding_tests/test_visualizations.py 100.0% <100.0%> (ø)

@MichaelFu512 MichaelFu512 changed the title TML-8241 Add multiseries support to graph_prediction_vs_actual_over_time Add multiseries support to graph_prediction_vs_actual_over_time Aug 21, 2023
@MichaelFu512 MichaelFu512 marked this pull request as ready for review August 21, 2023 17:39
Copy link
Contributor

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Screen Shot 2023-08-21 at 11 33 29 AM
  • 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 from curr_df["target"] where curr_df = data[data["series_id"] == single_series]
    • If I wanted to do that with the before code, I'd probably have to add more if statements 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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool - thanks for the explanation. Works for me!

evalml/model_understanding/visualizations.py Show resolved Hide resolved
Copy link
Contributor

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@eccabay eccabay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a docstring comment

evalml/model_understanding/visualizations.py Outdated Show resolved Hide resolved
@MichaelFu512 MichaelFu512 merged commit de64082 into main Aug 21, 2023
24 checks passed
@MichaelFu512 MichaelFu512 deleted the TML-8241 branch August 21, 2023 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

graph_prediction_vs_actual_over_time supports visualizing multiseries time series performance.
3 participants