|
44 | 44 | from .metrics.pairwise import euclidean_distances |
45 | 45 | from .utils import check_random_state |
46 | 46 | from .utils.validation import _num_samples |
47 | | -from .utils.validation import check_consistent_length |
48 | 47 | from .utils.validation import check_is_fitted |
49 | 48 | from .utils.validation import check_X_y |
50 | 49 | from .utils.multiclass import (_check_partial_fit_first_call, |
@@ -246,7 +245,7 @@ def partial_fit(self, X, y, classes=None): |
246 | 245 | "method".format(self.estimator)) |
247 | 246 | self.estimators_ = [clone(self.estimator) for _ in range |
248 | 247 | (self.n_classes_)] |
249 | | - |
| 248 | + |
250 | 249 | # A sparse LabelBinarizer, with sparse_output=True, has been shown to |
251 | 250 | # outperform or match a dense label binarizer in all cases and has also |
252 | 251 | # resulted in less or equal memory consumption in the fit_ovr function |
@@ -517,7 +516,7 @@ def partial_fit(self, X, y, classes=None): |
517 | 516 | self.estimators_ = Parallel(n_jobs=self.n_jobs)( |
518 | 517 | delayed(_partial_fit_ovo_binary)( |
519 | 518 | estimator, X, y, self.classes_[i], self.classes_[j]) |
520 | | - for estimator, (i, j) in izip(self.estimators_, ((i, j) for i |
| 519 | + for estimator, (i, j) in izip(self.estimators_, ((i, j) for i |
521 | 520 | in range(self.n_classes_) for j in range |
522 | 521 | (i + 1, self.n_classes_)))) |
523 | 522 | return self |
|
0 commit comments