Trains specified machine learning algorithms on the preprocessed training data.
train_models(
train_data,
label,
task,
algorithms,
resampling_method,
folds,
repeats,
tune_params,
metric,
summaryFunction = NULL,
seed = 123,
recipe,
use_default_tuning = FALSE,
tuning_strategy = "grid",
tuning_iterations = 10,
early_stopping = FALSE,
adaptive = FALSE,
algorithm_engines = NULL
)
A list of trained model objects.
Preprocessed training data frame.
Name of the target variable.
Type of task: "classification" or "regression".
Vector of algorithm names to train.
Resampling method for cross-validation (e.g., "cv", "repeatedcv", "boot", "none").
Number of folds for cross-validation.
Number of times to repeat cross-validation (only applicable for methods like "repeatedcv").
List of hyperparameter tuning ranges.
The performance metric to optimize.
A custom summary function for model evaluation. Default is NULL
.
An integer value specifying the random seed for reproducibility.
A recipe object for preprocessing.
Logical indicating whether to use default tuning grids when tune_params
is NULL
.
A string specifying the tuning strategy ("grid", "bayes", or "none"), possibly with adaptive methods.
Number of iterations for iterative tuning methods.
Logical for early stopping in Bayesian tuning.
Logical indicating whether to use adaptive/racing methods.
A named list specifying the engine to use for each algorithm.