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

Make K-fold CV with validate_search = FALSE possible #464

Merged
merged 14 commits into from Oct 23, 2023

Conversation

fweber144
Copy link
Collaborator

This makes it possible to use K-fold CV with validate_search = FALSE. In order to implement this, it was easier to perform some refactoring first (commits be9b149 to 6a626c3) instead of relying on more "hacky" solutions.

…LSE`

case to `cv_varsel.refmodel()` to avoid redundancies. This is possible because
within `loo_varsel()`, only object `refmodel` was modified before calling
performing the full-data search from `loo_varsel()`'s `validate_search = FALSE`
case and there, only `refmodel$y` was modified, which is not relevant for the
search.

This internal change may cause LOO subsampling with clustered projection during
the search to yield slightly different results due to different internal
pseudorandom number generator (PRNG) states. Furthermore, if `is.na(seed)`, then
the PRNG state for code downstream of such a `cv_varsel()` call will be
different due to this change.
…"]]`

out of `loo_varsel()` (makes it easier to combine this with similar code from
K-fold CV).
@fweber144 fweber144 merged commit 4ff6509 into stan-dev:master Oct 23, 2023
@fweber144 fweber144 deleted the valsearchF_kfold branch October 23, 2023 21:14
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

1 participant