From cd69a103416dfa1917cca52f4baf4ffa01a8abef Mon Sep 17 00:00:00 2001 From: NeroUcH Date: Wed, 5 Apr 2023 17:53:49 +0800 Subject: [PATCH 1/2] feat: add estimator type with reg and clf --- ngboost/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ngboost/api.py b/ngboost/api.py index a80c6a0..c083a57 100644 --- a/ngboost/api.py +++ b/ngboost/api.py @@ -96,6 +96,8 @@ def __init__( validation_fraction, early_stopping_rounds, ) + + self._estimator_type = "regressor" def __getstate__(self): state = super().__getstate__() @@ -172,6 +174,7 @@ def __init__( tol, random_state, ) + self._estimator_type = "classifier" def predict_proba(self, X, max_iter=None): """ From ce588f0a55e60bf3cbb909f833b393fee5012653 Mon Sep 17 00:00:00 2001 From: NeroUcH Date: Wed, 5 Apr 2023 18:19:09 +0800 Subject: [PATCH 2/2] fix: remove the whitespace --- ngboost/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ngboost/api.py b/ngboost/api.py index c083a57..4433f0e 100644 --- a/ngboost/api.py +++ b/ngboost/api.py @@ -96,7 +96,7 @@ def __init__( validation_fraction, early_stopping_rounds, ) - + self._estimator_type = "regressor" def __getstate__(self):