RandomForest Model

class qsar.models.random_forest.RandomForestModel(random_state: int = 0, params=None)

Bases: BaselineModel

A class used to represent a RandomForestModel, inheriting from the Model class. This class specifically handles the RandomForest Regressor from the sklearn library.

optimize_hyperparameters(trial: Trial, df: DataFrame) float

Optimizes the hyperparameters of the RandomForest Regressor model.

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