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

Add cvrefbuilder #271

Merged
merged 8 commits into from Feb 10, 2022
Merged

Conversation

fweber144
Copy link
Collaborator

This PR is necessary in conjunction with PRs paul-buerkner/brms#1287 and paul-buerkner/brms#1290 to solve paul-buerkner/brms#1286. But as mentioned in the message of commit 09c7286, this is also necessary for some custom reference models.

…ence models in

`.init_kfold_refmodel()`. This is needed for custom reference models, but also
for `get_refmodel.brmsfit()` to be able to set `brms_seed` appropriately there.

Also add element `projpred_k` to the subelements of `cvfits` to be able to infer
`brms_seed`s in `brms::get_refmodel.brmsfit()` from these. This may also be
helpful for custom `cvfits` and/or custom reference models.

Also improve documentation for argument `dis` of `init_refmodel()` because this
new `cvrefbuilder` argument allows to change argument `dis` for the K "refits"
of a `datafit` (if the user actually desires it).
… K-fold CV. In

particular, explain elements `omitted` and `projpred_k`.
…st for

brms reference models, in particular also covering grouped K-fold CV for GLMMs (because of brms issue paul-buerkner/brms#1286).

Also set `run_cvfits_all` to `FALSE` and change its behavior (now picking the first GLMM, if available).

Also handle reproducibility in the `cvfits` test for rstanarm in a better way (exploiting argument `folds` of `rstanarm::kfold.stanreg()`).
just a safety measure because `.Random.seed` could be redefined locally.
…ons" (simply

because this is the more appropriate place).
…to ensure that

arguments which are passed to `init_refmodel()` by the initial `get_refmodel.stanreg()` call are also passed to `init_refmodel()` by the K `get_refmodel.stanreg()` calls in K-fold CV. This is important for the latent and the augmented-data projection, for example. But it could also be useful for other arguments passed to `init_refmodel()`.
@fweber144
Copy link
Collaborator Author

Sorry, I noticed an incorrect cross-link in the message of former commit 8148008 (now b76ceff) and therefore had to force-push to achieve the reword.

@AlejandroCatalina AlejandroCatalina merged commit 0f5828e into stan-dev:develop Feb 10, 2022
@fweber144 fweber144 deleted the cvrefbuilder branch February 14, 2022 07:34
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

2 participants