View source: R/100_Resampler.R
| setup_Resampler | R Documentation |
setup_Resampler() is deprecated. Use setup_KFold(), setup_StratSub(),
setup_StratBoot(), setup_Bootstrap(), setup_LOOCV(), or setup_Custom().
Only arguments relevant to the selected type are forwarded. Omitted arguments
retain the selected setup function's default resolution.
setup_Resampler(
n_resamples = 10L,
type = c("KFold", "StratSub", "StratBoot", "Bootstrap", "LOOCV", "Custom"),
stratify_var = NULL,
train_p = 0.75,
strat_n_bins = 4L,
target_length = NULL,
id_strat = NULL,
seed = NULL,
verbosity = 1L,
resamples = NULL
)
n_resamples |
Integer [1, Inf): Number of resamples to make. |
type |
Character: Resampling method; matched without regard to case. |
stratify_var |
Optional Character: Variable to stratify by. |
train_p |
Numeric (0, 1): Training set percentage. |
strat_n_bins |
Integer [1, Inf): Number of bins to stratify by. |
target_length |
Optional Integer [1, Inf): Target length for stratified bootstraps. |
id_strat |
Optional Character: Name of the column holding per-case grouping IDs, e.g.
subject IDs when the dataset contains repeated measurements. Cases sharing an ID stay in the
same resample, so a case can only be present in the training or the test set, not both.
Requires that |
seed |
Optional Integer [0, Inf): Random seed. |
verbosity |
Integer: Console verbosity. The deprecation warning is always
signaled and can be handled with |
resamples |
Optional List: Resamples to use, one integer vector of training-case indices per resample. |
id_strat names a column in the input data; per-case ID vectors are not
accepted. Arguments that do not apply to the selected type are ignored.
A resampler configuration of the selected type.
config <- suppressWarnings(setup_Resampler(5L, "KFold", seed = 2026L))
config
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.