Compute Governed Exact K-Fold Cross-Validation
Source:R/specification-closure.R
compute_kfold_cv.RdUses brms::kfold() as an explicit fallback or complement to PSIS-LOO.
Grouped folds may use only the declared participant or item grouping column.
No model is selected automatically.
Arguments
- fit
Approved gp3bayes fit.
- K
Number of folds for random or stratified splitting.
- folds
One of
"random","stratified", or"grouped".- group
Optional declared grouping column used by stratified/grouped splitting.
- joint
One of
"obs","fold", or"group".- save_fits
Whether cross-validation refits are retained.
- seed
Random seed.