| cv | R Documentation |
Resampling specification generator.
cv(
v = 5,
repeats = 1,
strata = TRUE,
seed = NULL,
method = c("vfold", "holdout", "group_vfold", "time"),
prop = 0.8,
group = NULL,
time = NULL,
initial = NULL,
assess = NULL,
skip = 0,
cumulative = TRUE
)
v |
Number of folds for cross-validation. |
repeats |
Number of repeats for standard or grouped cross-validation. |
strata |
Logical; stratify classification outcomes when supported. |
seed |
Optional seed for reproducibility. |
method |
Resampling strategy: |
prop |
Training-set proportion for holdout splits. |
group |
Optional grouping variable name or vector for grouped CV. |
time |
Optional ordering variable name or vector for time-aware splits. |
initial |
Initial training window size for time-aware CV. |
assess |
Assessment window size for time-aware CV. |
skip |
Number of observations to skip between successive time splits. |
cumulative |
Logical; use an expanding training window for time-aware CV. |
A funcml_cv object containing fold indices and parameters.
cv(v = 3, repeats = 2, seed = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.