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

Compatibility with upcoming loo package release #29

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

jgabry
Copy link
Contributor

@jgabry jgabry commented Feb 1, 2024

We are working on an update to the loo package that affects a few lines of code in your package. This pull request should ensure compatibility with both the current version of loo and the next version.

The change in loo will be that the threshold for flagging pareto k estimates will change from fixed at 0.7 to a threshold determined by the posterior sample size. The resulting table of k estimates computed by loo::pareto_k_table will also now only have three rows for good, bad, and very bad.

If you want to test this PR with the version of loo that makes this change you can install that version using remotes::install_github("stan-dev/loo", ref = "new-pareto-k-threshold").

Comment on lines +37 to +43
if (nrow(k_table) == 4) {
loo_bad <- k_table["(0.7, 1]", "Count"]
loo_very_bad <- k_table["(1, Inf)", "Count"]
} else {
loo_bad <- k_table[2, "Count"]
loo_very_bad <- k_table[3, "Count"]
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code should work with any version of the loo package now

@ericward-noaa ericward-noaa merged commit 4c684c6 into fate-ewi:main Feb 5, 2024
1 check passed
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.

2 participants