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

pointwise() convenience function for extracting pointwise estimates #241

Merged
merged 4 commits into from Feb 13, 2024

Conversation

jgabry
Copy link
Member

@jgabry jgabry commented Feb 2, 2024

Closes #126

I ended up wanting this to make some code look nicer and it was very easy to implement, so I made a PR.

pointwise(loo_object, "elpd_loo") # returns vector of pointwise elpd_loo estimates
pointwise(loo_object, "p_loo") # returns vector of pointwise p_loo estimates
# etc. 

This works not only for loo() but also for loo_subsample(), loo_moment_match(), etc.

@jgabry jgabry requested a review from avehtari February 2, 2024 01:07
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0d53b04) 93.00% compared to head (4e7c1bd) 93.03%.

❗ Current head 4e7c1bd differs from pull request most recent head 5833dbe. Consider uploading reports for the commit 5833dbe to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #241      +/-   ##
==========================================
+ Coverage   93.00%   93.03%   +0.02%     
==========================================
  Files          30       31       +1     
  Lines        2788     2800      +12     
==========================================
+ Hits         2593     2605      +12     
  Misses        195      195              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jgabry
Copy link
Member Author

jgabry commented Feb 12, 2024

@avehtari This is super simple, so you don't need to spend much (or any) time looking at this, but just wanted to check if you're ok with adding this little convenience function. I think it's ready to merge if it's ok with you. I'm starting to prepare the release.

Copy link
Collaborator

@avehtari avehtari left a comment

Choose a reason for hiding this comment

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

This makes sense. Looks good

@jgabry jgabry merged commit b855083 into master Feb 13, 2024
6 checks passed
@jgabry jgabry deleted the pointwise-convenience-function branch February 13, 2024 16:31
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.

Convenience functions for accessing pointwise estimates
3 participants