Skip to content

Commit 0280ecc

Browse files
committed
use yield from for generator methods in _DenseAdaBoostClassifier
1 parent 2275f4b commit 0280ecc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/linearboost/linear_boost.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def staged_score(self, X, y, sample_weight=None):
145145
------
146146
z : float
147147
"""
148-
return super().staged_score(X, y, sample_weight)
148+
yield from super().staged_score(X, y, sample_weight)
149149

150150
def staged_predict(self, X):
151151
"""Return staged predictions for X.
@@ -167,7 +167,7 @@ def staged_predict(self, X):
167167
y : generator of ndarray of shape (n_samples,)
168168
The predicted classes.
169169
"""
170-
return super().staged_predict(X)
170+
yield from super().staged_predict(X)
171171

172172
def staged_decision_function(self, X):
173173
"""Compute decision function of ``X`` for each boosting iteration.
@@ -190,7 +190,7 @@ def staged_decision_function(self, X):
190190
values closer to -1 or 1 mean more like the first or second
191191
class in ``classes_``, respectively.
192192
"""
193-
return super().staged_decision_function(X)
193+
yield from super().staged_decision_function(X)
194194

195195
def predict_proba(self, X):
196196
"""Predict class probabilities for X.
@@ -235,7 +235,7 @@ def staged_predict_proba(self, X):
235235
The class probabilities of the input samples. The order of
236236
outputs is the same of that of the :term:`classes_` attribute.
237237
"""
238-
return super().staged_predict_proba(X)
238+
yield from super().staged_predict_proba(X)
239239

240240
def predict_log_proba(self, X):
241241
"""Predict class log-probabilities for X.

0 commit comments

Comments
 (0)