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

simplify mcse_elpd using log-normal approximation #246

Merged
merged 2 commits into from Feb 15, 2024
Merged

Conversation

avehtari
Copy link
Collaborator

Years ago I made mcse_elpd using a simple quadrature, but now switched to use a more efficient log-normal approximation. Given the mean and variance in linear scale, and knowing that the logarithm is closer to normal, we approximate the uncertainty in linear scale with log-normal and compute the corresponding normal distribution parameters in log scale using the equations shown, e.g., at https://en.wikipedia.org/wiki/Log-normal_distribution#Arithmetic_moments

The change makes relative change of 0.01%-0.1% compared to stored reference values and thus some reference rds files were updated.

@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ce0f540) 92.45% compared to head (6d348a1) 92.44%.

❗ Current head 6d348a1 differs from pull request most recent head 473e107. Consider uploading reports for the commit 473e107 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #246      +/-   ##
==========================================
- Coverage   92.45%   92.44%   -0.02%     
==========================================
  Files          31       31              
  Lines        2835     2831       -4     
==========================================
- Hits         2621     2617       -4     
  Misses        214      214              

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

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

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

Looks good. I'll include this in the release.

@jgabry jgabry merged commit 68ee019 into master Feb 15, 2024
6 checks passed
@jgabry jgabry deleted the mcse-elpd-simplify branch February 15, 2024 21:23
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.

None yet

3 participants