
Train + assess across resampling folds and combine the results
Source:R/ml_pipeline.R
morie_ml_resample.RdTrain + assess across resampling folds and combine the results
Usage
morie_ml_resample(
model,
x,
y,
n_folds = 5L,
metric = if (model$type == "logistic") "roc_auc" else "rmse",
seed = 42L
)Examples
morie_ml_resample(morie_ml_model("linear", "gd", epochs = 50),
mtcars[c("hp", "wt")], mtcars$mpg, n_folds = 3)$mean
#> [1] 2.761972