diff --git a/optgbm/sklearn.py b/optgbm/sklearn.py index e6093c5..3c4ff9c 100644 --- a/optgbm/sklearn.py +++ b/optgbm/sklearn.py @@ -263,6 +263,11 @@ def predict( class _BaseOGBMModel(lgb.LGBMModel): + @property + def best_index_(self) -> int: + """Index which corresponds to the best candidate parameter setting.""" + return self.study_.best_trial.number + def __init__( self, boosting_type: str = "gbdt",