diff --git a/sksurv/functions.py b/sksurv/functions.py index ee978cc8..154f0f75 100644 --- a/sksurv/functions.py +++ b/sksurv/functions.py @@ -12,7 +12,7 @@ # along with this program. If not, see . import numpy as np -from sklearn.utils import check_consistent_length +from sklearn.utils.validation import check_consistent_length __all__ = ["StepFunction"] diff --git a/sksurv/metrics.py b/sksurv/metrics.py index d797607d..af6bc4d6 100644 --- a/sksurv/metrics.py +++ b/sksurv/metrics.py @@ -12,9 +12,8 @@ # along with this program. If not, see . import numpy as np from sklearn.base import BaseEstimator -from sklearn.utils import check_array, check_consistent_length from sklearn.utils.metaestimators import available_if -from sklearn.utils.validation import check_is_fitted +from sklearn.utils.validation import check_array, check_consistent_length, check_is_fitted from .exceptions import NoComparablePairException from .nonparametric import CensoringDistributionEstimator, SurvivalFunctionEstimator diff --git a/sksurv/svm/naive_survival_svm.py b/sksurv/svm/naive_survival_svm.py index c46d0bdc..26d6c7da 100644 --- a/sksurv/svm/naive_survival_svm.py +++ b/sksurv/svm/naive_survival_svm.py @@ -16,8 +16,7 @@ import pandas as pd from scipy.special import comb from sklearn.svm import LinearSVC -from sklearn.utils import check_random_state -from sklearn.utils.validation import _get_feature_names, validate_data +from sklearn.utils.validation import _get_feature_names, check_random_state, validate_data from ..base import SurvivalAnalysisMixin from ..exceptions import NoComparablePairException diff --git a/sksurv/util.py b/sksurv/util.py index 1580d901..87e2a73e 100644 --- a/sksurv/util.py +++ b/sksurv/util.py @@ -13,7 +13,7 @@ import numpy as np import pandas as pd from pandas.api.types import CategoricalDtype -from sklearn.utils import check_array, check_consistent_length +from sklearn.utils.validation import check_array, check_consistent_length __all__ = ["check_array_survival", "check_y_survival", "safe_concat", "Surv"]