Skip to content

Add moment-matching support to $loo() method #778

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

Merged
merged 12 commits into from
Jun 27, 2023
Merged

Conversation

andrjohns
Copy link
Collaborator

Submission Checklist

  • Run unit tests
  • Declare copyright holder and agree to license (see below)

Summary

This PR adds an option to the $loo() method: moment_match, which enables the use of a moment-matching correction for any problematic observations: https://mc-stan.org/loo/articles/loo2-moment-matching.html

Copyright and Licensing

Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
Andrew Johnson

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

@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2023

Codecov Report

Merging #778 (e2a686e) into master (83bbc35) will decrease coverage by 0.92%.
The diff coverage is 100.00%.

❗ Current head e2a686e differs from pull request most recent head a6eb030. Consider uploading reports for the commit a6eb030 to get more accurate results

@@            Coverage Diff             @@
##           master     #778      +/-   ##
==========================================
- Coverage   88.21%   87.30%   -0.92%     
==========================================
  Files          12       12              
  Lines        4134     4097      -37     
==========================================
- Hits         3647     3577      -70     
- Misses        487      520      +33     
Impacted Files Coverage Δ
R/fit.R 96.22% <100.00%> (+0.15%) ⬆️

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@topipa
Copy link

topipa commented Jun 24, 2023

Thank you for implemeting this! Let me know if I can help with anything. The implementation looks good to me, although I'm not very familiar with cmdstanr.

@andrjohns
Copy link
Collaborator Author

Thank you for implemeting this! Let me know if I can help with anything. The implementation looks good to me, although I'm not very familiar with cmdstanr.

No worries! Feel free to let me know if there are any other additions/features that could be useful

Copy link
Member

@rok-cesnovar rok-cesnovar 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 to me. Feel free to merge.

@andrjohns andrjohns merged commit dbf41cd into master Jun 27, 2023
@jgabry
Copy link
Member

jgabry commented Jun 27, 2023

Cool, thanks for implementing this!

@jgabry jgabry deleted the loo-moment-match branch June 27, 2023 16: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.

5 participants