| resampling | R Documentation |
These constructors return a lightweight survalis_resampling description that
the verb-level functions turn into concrete train/test splits. They do not
touch the data themselves, so the same specification can be reused across
models to obtain paired comparisons (identical folds via a shared seed).
cv(v = 5, repeats = 1, strata = "status", seed = NULL)
holdout(prop = 0.75, strata = "status", seed = NULL)
groupcv(group, v = 5, seed = NULL)
bootstrap(times = 25, seed = NULL)
v |
Integer number of folds (default |
repeats |
Integer number of times the whole v-fold scheme is repeated
with fresh random folds (default |
strata |
Column name to stratify on, or |
seed |
Optional integer seed. Set it (and keep it equal across models) for paired resampling. |
prop |
Proportion of rows assigned to the training set in |
group |
Column name whose distinct values define the groups held out
together in |
times |
Integer number of bootstrap resamples (default |
cv() – k-fold cross-validation, optionally repeated, stratified on the
event indicator by default.
holdout() – a single stratified train/test split.
groupcv() – k-fold cross-validation where whole groups (e.g. centres,
subjects with repeated rows) are held out together.
bootstrap() – resampling with replacement; the out-of-bag rows form the
assessment set (Efron-Tibshirani style, suitable for .632 reporting).
An object of class survalis_resampling.
cv(5)
cv(v = 10, repeats = 3, seed = 1)
holdout(prop = 0.8)
bootstrap(times = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.