-
-
Notifications
You must be signed in to change notification settings - Fork 8
Add loo_i
function for single observation PSIS-LOO-CV computation
#182
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #182 +/- ##
==========================================
+ Coverage 62.64% 70.54% +7.89%
==========================================
Files 14 39 +25
Lines 1925 4345 +2420
==========================================
+ Hits 1206 3065 +1859
- Misses 719 1280 +561 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/arviz_stats/loo/loo.py
Outdated
|
||
loo_inputs = _prepare_loo_inputs(data, var_name) | ||
|
||
i = int(i) |
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.
You checked that i is integer
src/arviz_stats/loo/loo.py
Outdated
|
||
Parameters | ||
---------- | ||
i : int |
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.
Maybe use idx?
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 is a good point. I initially thought that this function would just be for quick testing mainly with custom log-likelihood functions so the actual indexing wouldn't be relevant. But I think maybe we should account for more calculated options here for the user.
The most recent commit allows for several different ways of doing this. Maybe this is overkill though?
Most recent change simplifies the way you can select an observation so we're not trying to infer many different ways of doing this. |
This adds the
loo_i()
function to compute PSIS-LOO-CV for a single observation.Resolves #181
📚 Documentation preview 📚: https://arviz-stats--182.org.readthedocs.build/en/182/