Skip to content

Fix E_loo_khat error when posterior::pareto_khat returns NA#264

Merged
jgabry merged 1 commit intomasterfrom
fix-NA-handling-in-E_loo_khat
Mar 29, 2024
Merged

Fix E_loo_khat error when posterior::pareto_khat returns NA#264
jgabry merged 1 commit intomasterfrom
fix-NA-handling-in-E_loo_khat

Conversation

@jgabry
Copy link
Member

@jgabry jgabry commented Mar 28, 2024

closes #263

This avoids the error mentioned by @bgoodri in #263 by first checking if posterior::pareto_khat returns a list or NA.

@jgabry jgabry requested a review from avehtari March 28, 2024 18:45
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.69%. Comparing base (1ccfc44) to head (afe9bb5).

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #264      +/-   ##
==========================================
+ Coverage   92.68%   92.69%   +0.01%     
==========================================
  Files          31       31              
  Lines        2842     2846       +4     
==========================================
+ Hits         2634     2638       +4     
  Misses        208      208              

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

@avehtari
Copy link
Member

Doesn't look nice, but I don't see how else to do it

@jgabry jgabry merged commit 9f28fc4 into master Mar 29, 2024
@jgabry jgabry deleted the fix-NA-handling-in-E_loo_khat branch March 29, 2024 19:32
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_R2 can fail on examples where it worked before

3 participants