Skip to content

Commit b4df1a0

Browse files
authored
Merge pull request #5 from algo-hhu/update_sklearn_version
fixed deprecated warning for sklearn
2 parents 93ece50 + 25a9e5e commit b4df1a0

File tree

3 files changed

+128
-33
lines changed

3 files changed

+128
-33
lines changed

kmsr/core.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
)
1313
from sklearn.exceptions import NotFittedError
1414
from sklearn.utils._param_validation import Interval, StrOptions
15-
from sklearn.utils.validation import check_random_state
15+
from sklearn.utils.validation import (
16+
_check_feature_names,
17+
check_random_state,
18+
validate_data,
19+
)
1620

1721
import kmsr._core # type: ignore
1822

@@ -100,9 +104,9 @@ def _fit(
100104
X: Sequence[Sequence[float]],
101105
) -> "KMSR":
102106
self._validate_params()
103-
self._check_feature_names(X, reset=True)
104-
105-
_X = self._validate_data(
107+
_check_feature_names(self, X, reset=True)
108+
_X = validate_data(
109+
self,
106110
X,
107111
accept_sparse="csr",
108112
dtype=[np.float64],

0 commit comments

Comments
 (0)