train_models | R Documentation |
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
)
train_data |
Preprocessed training data frame. |
label |
Name of the target variable. |
task |
Type of task: "classification" or "regression". |
algorithms |
Vector of algorithm names to train. |
resampling_method |
Resampling method for cross-validation (e.g., "cv", "repeatedcv", "boot", "none"). |
folds |
Number of folds for cross-validation. |
repeats |
Number of times to repeat cross-validation (only applicable for methods like "repeatedcv"). |
tune_params |
List of hyperparameter tuning ranges. |
metric |
The performance metric to optimize. |
summaryFunction |
A custom summary function for model evaluation. Default is |
seed |
An integer value specifying the random seed for reproducibility. |
recipe |
A recipe object for preprocessing. |
use_default_tuning |
Logical indicating whether to use default tuning grids when |
tuning_strategy |
A string specifying the tuning strategy ("grid", "bayes", or "none"), possibly with adaptive methods. |
tuning_iterations |
Number of iterations for iterative tuning methods. |
early_stopping |
Logical for early stopping in Bayesian tuning. |
adaptive |
Logical indicating whether to use adaptive/racing methods. |
algorithm_engines |
A named list specifying the engine to use for each algorithm. |
A list of trained model objects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.