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

fix loo_moment_matching NaN issue #259

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Conversation

avehtari
Copy link
Collaborator

@avehtari avehtari commented Mar 4, 2024

Fixes #258

  • In loo_moment_matching and split_moment_matching replace NaN's in log ratios resulting from -Inf + Inf with -Inf before calling importance_sampling.default()
  • in validate_ll() allow -Inf
  • update tests

@avehtari avehtari requested a review from jgabry March 4, 2024 17:54
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 92.77%. Comparing base (45c261e) to head (74cb9e3).
Report is 14 commits behind head on master.

❗ Current head 74cb9e3 differs from pull request most recent head 5e4cf37. Consider uploading reports for the commit 5e4cf37 to get more accurate results

Files Patch % Lines
R/E_loo.R 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #259      +/-   ##
==========================================
- Coverage   92.78%   92.77%   -0.02%     
==========================================
  Files          31       31              
  Lines        2829     2836       +7     
==========================================
+ Hits         2625     2631       +6     
- Misses        204      205       +1     

☔ 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

@jgabry jgabry merged commit 52bc270 into master Mar 5, 2024
6 checks passed
@jgabry jgabry deleted the fix_moment_matching_NA_issue branch March 5, 2024 15:07
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.

loo_moment_match fails if new log likelihood is -Inf
3 participants