-
-
Notifications
You must be signed in to change notification settings - Fork 2
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 plot_compare #77
Add plot_compare #77
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
+ Coverage 83.84% 84.71% +0.86%
==========================================
Files 20 21 +1
Lines 2229 2336 +107
==========================================
+ Hits 1869 1979 +110
+ Misses 360 357 -3 ☔ View full report in Codecov by Sentry. |
I really like the proposed changes. Completely agree on |
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 great, my main comment is using plot_kwargs
and setdefault
so it is more similar to other plots and offers similar felxibility
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.
General comment about this, I am still working on the example gallery and automating parts of the content that won't need our input. For example, instead of manually listing examples using the same function, I am trying to add a directive that generates a grid of elements (inspired from sphinx-gallery extension)
What parts do you think should not be part of your input?
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.
Not sure I understand your question.
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 removed the (gallery_xyz)=
for exmple, which is now automated, left only title, description and seealso box as user input now. But maybe we can improve that further
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.
tried fixing the example for now, skimmed the code. It looks good, and uses the walrus! I had actually forgotten it existed 🤣 but I love it
if isinstance(target, np.ndarray): | ||
target = target.tolist() |
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.
for the none backend there are many "target.append" instances (see here). But create_plotting_grid
for none backend returns an array. These lines "fix" the issue without changing the current behavior on none backend, but maybe we should...
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.
It generally is an array of empty lists, so then .map
subsets the array and target ends up being the list that represents the desired subplot. It is very probably broken for (1,1) "grid" though so we get an empty array instead of an array with a single empty list 🤔
closes #76
There are two major points I want to discuss for this PR (or we can split the discussion into more than one PR).
plot_compare
about the second point I would like to simplify the plot and only show the ELPD point estimates + SE. Then we will get rid of the arguments
insample_dev
,plot_standard_error
,plot_ic_diff
,order_by_rank
,legend
. The main reason for this is that these are the most useful elements for the plot and this is how most people use and interpret this plot (including the equivalent plot in the Stan world).I also would like to add two new arguments (already in the docstring), that I think could help make the plot easier to interpret.
Update
This is how it looks like now in
matplotlib
plotly (the band is missing from plotly, not sure why yet)
bokeh