tl_tune_xgboost: Tune XGBoost hyperparameters

View source: R/supervised-xgboost.R

tl_tune_xgboostR Documentation

Tune XGBoost hyperparameters

Description

Tune XGBoost hyperparameters

Usage

tl_tune_xgboost(
  data,
  formula,
  is_classification = FALSE,
  param_grid = NULL,
  cv_folds = 5,
  early_stopping_rounds = 10,
  verbose = TRUE,
  ...
)

Arguments

data

A data frame containing the training data

formula

A formula specifying the model

is_classification

Logical indicating if this is a classification problem

param_grid

Named list of parameter values to try

cv_folds

Number of cross-validation folds (default: 5)

early_stopping_rounds

Early stopping rounds (default: 10)

verbose

Logical indicating whether to print progress (default: TRUE)

...

Additional arguments

Value

A list with the best model and tuning results


tidylearn documentation built on Feb. 6, 2026, 5:07 p.m.