Skip to content

Commit

Permalink
Add n_classes_
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-oHr-N committed Mar 1, 2020
1 parent 1b01279 commit 4e25975
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 @@ -722,6 +722,11 @@ def classes_(self) -> np.ndarray:

return self._classes

@property
def n_classes_(self) -> int:
"""Number of classes."""
return self._n_classes

def predict(self, X: TWO_DIM_ARRAYLIKE_TYPE) -> ONE_DIM_ARRAYLIKE_TYPE:
"""Predict using the fitted model.
Expand Down

0 comments on commit 4e25975

Please sign in to comment.