Lasso Model

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

Bases: BaselineModel

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

optimize_hyperparameters(trial: Trial, df: DataFrame) float

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

Parameters:
  • trial (optuna.Trial) – The trial instance for hyperparameter optimization.

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

Returns:

The cross-validation score of the model.

Return type:

float