Skip to content

Commit 3177bf8

Browse files
committed
Fix future warning
1 parent bda06e0 commit 3177bf8

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

hiclass/HierarchicalClassifier.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@
1111
from joblib import Parallel, delayed
1212
from sklearn.base import BaseEstimator
1313
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)
1616

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
2622

2723
try:
2824
import ray
@@ -173,8 +169,8 @@ def _pre_fit(self, X, y, sample_weight):
173169
# Check that X and y have correct shape
174170
# and convert them to np.ndarray if need be
175171

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
178174
)
179175

180176
if sample_weight is not None:

0 commit comments

Comments
 (0)