cv_generic | R Documentation |
For each fold (train/test indices):
Subset data[train, ]
Fit a model with .fit_fun(train_data, ...)
Evaluate with .measure_fun(model, test_data, ...)
cv_generic(
data,
folds,
.fit_fun,
.measure_fun,
fit_args = list(),
measure_args = list(),
backend = c("serial", "future"),
...
)
data |
A matrix or data.frame of shape (n x p). |
folds |
A list of folds, each a list with |
.fit_fun |
Function: signature |
.measure_fun |
Function: signature |
fit_args |
A list of additional named arguments passed to |
measure_args |
A list of additional named arguments passed to |
backend |
Character string: "serial" (default) or "future" for parallel execution using the |
... |
Currently ignored (arguments should be passed via |
A tibble with columns:
fold |
integer fold index |
model |
list of fitted models |
metrics |
list of metric tibbles/lists |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.