|
11 | 11 | from joblib import Parallel, delayed |
12 | 12 | from sklearn.base import BaseEstimator |
13 | 13 | from sklearn.linear_model import LogisticRegression |
14 | | -from sklearn.utils.validation import _check_sample_weight |
15 | | -from sklearn.utils.validation import check_array, check_is_fitted |
| 14 | +from sklearn.utils.validation import (_check_sample_weight, check_array, |
| 15 | + check_is_fitted, validate_data) |
16 | 16 |
|
17 | | -from hiclass.probability_combiner import ( |
18 | | - GeometricMeanCombiner, |
19 | | - ArithmeticMeanCombiner, |
20 | | - MultiplyCombiner, |
21 | | -) |
22 | | - |
23 | | -from hiclass.probability_combiner import ( |
24 | | - init_strings as probability_combiner_init_strings, |
25 | | -) |
| 17 | +from hiclass.probability_combiner import (ArithmeticMeanCombiner, |
| 18 | + GeometricMeanCombiner, |
| 19 | + MultiplyCombiner) |
| 20 | +from hiclass.probability_combiner import \ |
| 21 | + init_strings as probability_combiner_init_strings |
26 | 22 |
|
27 | 23 | try: |
28 | 24 | import ray |
@@ -173,8 +169,8 @@ def _pre_fit(self, X, y, sample_weight): |
173 | 169 | # Check that X and y have correct shape |
174 | 170 | # and convert them to np.ndarray if need be |
175 | 171 |
|
176 | | - self.X_, self.y_ = self._validate_data( |
177 | | - X, y, multi_output=True, accept_sparse="csr", allow_nd=True |
| 172 | + self.X_, self.y_ = validate_data( |
| 173 | + self, X, y, multi_output=True, accept_sparse="csr", allow_nd=True |
178 | 174 | ) |
179 | 175 |
|
180 | 176 | if sample_weight is not None: |
|
0 commit comments