Skip to content

Added sorted log ratio path for loo#452

Open
VisruthSK wants to merge 1 commit into
masterfrom
ps-tail-specialization
Open

Added sorted log ratio path for loo#452
VisruthSK wants to merge 1 commit into
masterfrom
ps-tail-specialization

Conversation

@VisruthSK

@VisruthSK VisruthSK commented Jun 17, 2026

Copy link
Copy Markdown
Member

This PR was made with assistance from Codex.

Summary

Add ps_tail_sorted_log_ratios(), a specialized helper for loo to use when the log-ratio tail has already been sorted. See stan-dev/loo#290, especially this comment for more motivation.

Removed warning in ps_tail() for too few tail draws as the aforementioned comment suggests. Also deduplicate some code in ps_tail() with a new internal helper.

Copyright and Licensing

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

@github-actions

Copy link
Copy Markdown

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

  • ✔️as_draws_array: 156ms -> 155ms [-1.7%, +0.66%]
  • ✔️as_draws_df: 82.7ms -> 82.6ms [-1.29%, +1.04%]
  • ✔️as_draws_list: 173ms -> 176ms [-0.19%, +3.7%]
  • ✔️as_draws_matrix: 25.4ms -> 25ms [-5.02%, +1.68%]
  • ✔️as_draws_rvars: 132ms -> 131ms [-1.55%, +0.71%]
  • ❗🐌summarise_draws_100_variables: 773ms -> 821ms [+5.56%, +6.66%]
  • ✔️summarise_draws_10_variables: 86.5ms -> 86.4ms [-0.4%, +0.16%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@VisruthSK VisruthSK marked this pull request as ready for review June 18, 2026 03:04
@VisruthSK VisruthSK requested a review from avehtari June 18, 2026 03:04
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.

1 participant