Skip to content

Commit acf6b27

Browse files
Merge pull request #325 from NeroHin/master
feat: Add estimator type with reg and clf for NGBClassifier and NGBRegressor
2 parents 38c2245 + ce588f0 commit acf6b27

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ngboost/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def __init__(
9797
early_stopping_rounds,
9898
)
9999

100+
self._estimator_type = "regressor"
101+
100102
def __getstate__(self):
101103
state = super().__getstate__()
102104
# Remove the unpicklable entries.
@@ -172,6 +174,7 @@ def __init__(
172174
tol,
173175
random_state,
174176
)
177+
self._estimator_type = "classifier"
175178

176179
def predict_proba(self, X, max_iter=None):
177180
"""

0 commit comments

Comments
 (0)