-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 summary function #51
Conversation
tag me when you are ready for a review |
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.
This looks great. Just a few nits about the docstring and type-hints, if you are okay with the suggested changes.
The only thing I would request an actual change for is the default value in the docstring does not match that in the function signature.
Co-authored-by: Andy Maloney <amaloney@mailbox.org>
I fixed the docstring and added type hints. Please check if they are ok, feel free to make changes if you want. Not sure about the type hints for |
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 think this is a great start. There are some new plumbings in Python 3.13 that will make more complicated types easier to handle, but I think what you have now will work just fine.
Closes #11
This adds the basic functionality for the
summary
function. It is still not on par with thesummary
function from old ArviZ, but it is better than nothing.Currently, the output is a dataset. To get a Pandas' DataFrame we need arviz-devs/arviz-base#25In the old arviz we had a
kind
argument and astat_focus
argument. The combination of both specifies which stats/diagnostics were computed. Now we achieve the same with just thekind
argument. For instancekind="all"
is the equivalent of the oldkind=all
andstats_focus="mean"
and kindkind="all_median"
is the equivalent of the oldkind=all
andstats_focus="median"
. Having a single argument seems clear to me.One source of inconsistency is that previously we returned the
hdi
ifstat_focus="mean"
and theeti
ifstat_focus="median
. But in arviz 1.0 whether to compute these two different CI depend on a globalrcparam
value.Should we ignore theIf "stats_median", or "all_median" we returnrcparam
specification and return what thekind
argument dictates?eti
irrespective of the value ofci_kind
(or the value in rcparams).📚 Documentation preview 📚: https://arviz-stats--51.org.readthedocs.build/en/51/