From 1b01279cc314959dd5bffd4a7b43e4d10b9b13a9 Mon Sep 17 00:00:00 2001 From: Y-oHr-N Date: Mon, 2 Mar 2020 04:19:08 +0900 Subject: [PATCH] Add n_splits_ --- optgbm/sklearn.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/optgbm/sklearn.py b/optgbm/sklearn.py index 3c4ff9c..fac1ebc 100644 --- a/optgbm/sklearn.py +++ b/optgbm/sklearn.py @@ -563,6 +563,7 @@ def fit( self.best_params_ = {**params, **self.study_.best_params} self._best_iteration = self.study_.user_attrs["best_iteration"] + self.n_splits_ = cv.get_n_splits(X, y, groups=groups) logger = logging.getLogger(__name__) @@ -696,6 +697,9 @@ class OGBMClassifier(_BaseOGBMModel, ClassifierMixin): n_features_ Number of features of fitted model. + n_splits_: + Number of cross-validation splits. + study_ Actual study. @@ -863,6 +867,9 @@ class OGBMRegressor(_BaseOGBMModel, RegressorMixin): n_features_ Number of features of fitted model. + n_splits_: + Number of cross-validation splits. + study_ Actual study.