View source: R/helper_functions.R
get_default_tune_params | R Documentation |
Returns a list of default tuning parameter ranges for a specified algorithm based on the provided training data, outcome label, and engine.
get_default_tune_params(algo, train_data, label, engine)
algo |
A character string specifying the algorithm name. Supported values include: |
train_data |
A data frame containing the training data. |
label |
A character string specifying the name of the outcome variable in |
engine |
A character string specifying the engine to be used for the algorithm. Different engines may have different tuning parameter ranges. |
The function first determines the number of predictors by removing the outcome variable (specified by label
) from train_data
. It then uses a switch
statement to select a list of default tuning parameter ranges tailored for the specified algorithm and engine. The tuning ranges have been adjusted for efficiency and may include parameters such as mtry
, trees
, min_n
, and others depending on the algorithm.
A list of tuning parameter ranges for the specified algorithm. If no tuning parameters are defined for the given algorithm, the function returns NULL
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.