Generic cross-validation
crossval_ml(
x,
y,
fit_func = crossvalidation::fit_lm,
predict_func = crossvalidation::predict_lm,
fit_params = NULL,
k = 5,
repeats = 3,
p = 1,
seed = 123,
eval_metric = NULL,
cl = NULL,
errorhandling = c("stop", "remove", "pass"),
packages = c("stats", "Rcpp"),
verbose = FALSE,
show_progress = TRUE,
...
)
input covariates' matrix
response variable; a vector
a function for fitting the model
a function for predicting values from the model
a list; additional (model-specific) parameters to be passed
to fit_func
an integer; number of folds in k-fold cross validation
an integer; number of repeats for the k-fold cross validation
a float; proportion of data in the training/testing set, default is 1 and
must be > 0.5. If p
< 1, a validation set error is calculated on the
remaining 1-p
fraction data
random seed for reproducibility of results
a function measuring the test errors; if not provided: RMSE for regression and accuracy for classification
an integer; the number of clusters for parallel execution
specifies how a task evalution error should be handled. If value is "stop", then execution will be stopped if an error occurs. If value is "remove", the result for that task will not be returned. If value is "pass", then the error object generated by task evaluation will be included with the rest of the results. The default value is "stop".
character vector of packages that the tasks depend on
logical flag enabling verbose messages. This can be very useful for troubleshooting.
show evolution of the algorithm
additional parameters