Skip to content

Commit

Permalink
Merge pull request #325 from NeroHin/master
Browse files Browse the repository at this point in the history
feat: Add estimator type with reg and clf for NGBClassifier and NGBRegressor
  • Loading branch information
alejandroschuler authored Oct 29, 2024
2 parents 38c2245 + ce588f0 commit acf6b27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ngboost/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def __init__(
early_stopping_rounds,
)

self._estimator_type = "regressor"

def __getstate__(self):
state = super().__getstate__()
# Remove the unpicklable entries.
Expand Down Expand Up @@ -172,6 +174,7 @@ def __init__(
tol,
random_state,
)
self._estimator_type = "classifier"

def predict_proba(self, X, max_iter=None):
"""
Expand Down

0 comments on commit acf6b27

Please sign in to comment.