Skip to content

Conversation

@jordandeklerk
Copy link
Member

@jordandeklerk jordandeklerk commented Dec 29, 2025

Continuation of #267.

Migrates loo_score, loo_pit, loo_expectation, loo_quantile, loo_r2, and loo_summary into the base layer, making these functions accessible via .azstats without requiring the full LOO orchestration machinery.

Core functions require pre-computed PSIS weights rather than computing them internally. This enables weight reuse, e.g., users can compute PSIS once and pass the weights to multiple metrics, avoiding redundant computation. The exception to this is _loo, which can compute PSIS internally since it's the foundational function that produces pareto_k.

@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 96.86099% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.11%. Comparing base (605327c) to head (928ce15).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/arviz_stats/base/dataarray.py 90.24% 4 Missing ⚠️
src/arviz_stats/base/diagnostics.py 97.27% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
+ Coverage   83.88%   84.11%   +0.23%     
==========================================
  Files          42       42              
  Lines        5454     5560     +106     
==========================================
+ Hits         4575     4677     +102     
- Misses        879      883       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jordandeklerk jordandeklerk changed the title Centralize LOO Functions in the Array Layer Centralize LOO functions in the array layer Dec 29, 2025
@jordandeklerk jordandeklerk changed the title Centralize LOO functions in the array layer Move more LOO functions into the array layer Dec 31, 2025
@jordandeklerk jordandeklerk marked this pull request as ready for review January 5, 2026 19:53
@jordandeklerk
Copy link
Member Author

I think the RTD failure is unrelated to this

Copy link
Contributor

@aloctavodia aloctavodia left a comment

Choose a reason for hiding this comment

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

I was not able to notice any obvious issue. In tests we trust!

@aloctavodia aloctavodia merged commit e7f8e32 into main Jan 7, 2026
10 of 11 checks passed
@aloctavodia aloctavodia deleted the ary branch January 7, 2026 08:49
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.

3 participants