XGBoost Model

class qsar.models.xgboost.XgboostModel(max_iter: int = 100000, random_state: int = 0, params=None)

Bases: BaselineModel

A class used to represent a XGBoostModel, inheriting from the Model class. This class specifically handles the XGBoost Regressor from the xgboost library.

optimize_hyperparameters(trial: Trial, df: DataFrame) float

Optimizes the hyperparameters of the XGBoost Regressor model using a trial from Optuna.

Parameters:
  • trial (Trial) – the trial for hyperparameter optimization

  • df (pd.DataFrame) – the dataframe used for training the model

Returns:

the cross validation score of the model

Return type:

float