Skip to content

Commit 93d9a53

Browse files
committed
fix predict_proba for classifer
1 parent 2c4eb9d commit 93d9a53

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

autosklearn/automl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ def predict(self, X, batch_size=None, n_jobs=1):
943943
return predicted_classes
944944

945945
def predict_proba(self, X, batch_size=None, n_jobs=1):
946-
return self._automl.predict(X, batch_size=batch_size, n_jobs=n_jobs)
946+
return super().predict(X, batch_size=batch_size, n_jobs=n_jobs)
947947

948948

949949
class AutoMLRegressor(BaseAutoML):

autosklearn/estimators.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ def refit(self, X, y):
308308
def predict(self, X, batch_size=None, n_jobs=1):
309309
return self._automl.predict(X, batch_size=batch_size, n_jobs=n_jobs)
310310

311+
def predict_proba(self, X, batch_size=None, n_jobs=1):
312+
return self._automl.predict_proba(
313+
X, batch_size=batch_size, n_jobs=n_jobs)
314+
311315
def score(self, X, y):
312316
return self._automl.score(X, y)
313317

@@ -428,7 +432,7 @@ def predict_proba(self, X, batch_size=None, n_jobs=1):
428432
The predicted class probabilities.
429433
430434
"""
431-
return self._automl.predict_proba(
435+
return super().predict_proba(
432436
X, batch_size=batch_size, n_jobs=n_jobs)
433437

434438

0 commit comments

Comments
 (0)