8000 FIX #7501 whats_new file updated · scikit-learn/scikit-learn@fc337c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc337c5

Browse files
dokatoDominik Krzeminski
authored and
Dominik Krzeminski
committed
FIX #7501 whats_new file updated
1 parent ad9227a commit fc337c5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

doc/whats_new.rst

+4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ Enhancements
153153
Bug fixes
154154
.........
155155

156+
- Fixed a bug where :class:`sklearn.ensemble.AdaBoostClassifier` throws
157+
`ZeroDivisionError` while fitting data with single class labels.
158+
:issue:`7501` by :user:`Dominik Krzeminski <dokato>`.
159+
156160
- Fixed a bug where :class:`sklearn.linear_model.RandomizedLasso` and
157161
:class:`sklearn.linear_model.RandomizedLogisticRegression` breaks for
158162
sparse input.

sklearn/ensemble/weight_boosting.py

+1
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ def predict_proba(self, X):
773773
normalizer = proba.sum(axis=1)[:, np.newaxis]
774774
normalizer[normalizer == 0.0] = 1.0
775775
proba /= normalizer
776+
776777
return proba
777778

778779
def staged_predict_proba(self, X):

0 commit comments

Comments
 (0)
0