torch_frame.gbdt.XGBoost

class XGBoost(task_type: TaskType, num_classes: Optional[int] = None, metric: Optional[Metric] = None)[source]

Bases: GBDT

An XGBoost model implementation with hyper-parameter tuning using Optuna.

This implementation extends GBDT and aims to find optimal hyperparameters by optimizing the given objective function.

objective(trial: Any, dtrain: Any, dvalid: Any, num_boost_round: int, early_stopping_rounds: int) float[source]

Objective function to be optimized.

Parameters:
Returns:

Best objective value. Root mean squared error for regression task and accuracy for classification task.

Return type:

float