Skip to content

Commit

Permalink
Add best_index_
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-oHr-N committed Mar 1, 2020
1 parent ed7bf56 commit c8a037f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions optgbm/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c8a037f

Please sign in to comment.