8000 MAINT Remove redundant sample_weights check in DummyClassifier (#15510) · scikit-learn/scikit-learn@725ca8f · GitHub
[go: up one dir, main page]

Skip to content

Commit 725ca8f

Browse files
fbchowsalliewalecka
authored andcommitted
MAINT Remove redundant sample_weights check in DummyClassifier (#15510)
Co-authored-by: Sallie Walecka <sallie.walecka@gmail.com>
1 parent c393bdc commit 725ca8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/dummy.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def fit(self, X, y, sample_weight=None):
156156

157157
self.n_outputs_ = y.shape[1]
158158

159-
check_consistent_length(X, y, sample_weight)
159+
check_consistent_length(X, y)
160160

161161
if sample_weight is not None:
162162
sample_weight = _check_sample_weight(sample_weight, X)
@@ -245,7 +245,7 @@ def predict(self, X):
245245
classes_ = [np.array([c]) for c in constant]
246246

247247
y = _random_choice_csc(n_samples, classes_, class_prob,
248-
self.random_state)
248+
self.random_state)
249249
else:
250250
if self._strategy in ("most_frequent", "prior"):
251251
y = np.tile([classes_[k][class_prior_[k].argmax()] for

0 commit comments

Comments
 (0)
0