stan-dev / posterior

The posterior R package
https://mc-stan.org/posterior/
Other
167 stars 24 forks source link

Change pareto functions to return unnamed numerics #370

Closed n-kall closed 6 months ago

n-kall commented 6 months ago

Summary

This changes pareto_* functions to no longer return named numeric values if there is just a single value output. This applies to pareto_khat, pareto_khat_threshold, pareto_min_ss, and pareto_convergence_rate.

pareto_diags returns a named vector of all of these. And pareto_smooth is not affected by this.

This also changes the return type of pareto_khat to be an unnamed numeric rather than a list, which would require a change in loo (specifically E_loo). As there is already an issue that needed to be worked around (stan-dev/loo/issues/263) I think this is worth addressing now.

This would close #359 and #346

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

github-actions[bot] commented 6 months ago

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 86c8fba71b1be6cf01e847cb7901fd384ab4fa2b is merged into master:

paul-buerkner commented 6 months ago

Looks good to me. Do you want to make any changes before I merge?

n-kall commented 6 months ago

I think it's ready

paul-buerkner commented 6 months ago

great! Merging now. Thank you!