Skip to content

Commit

Permalink
Don't import fom sklearn.utils
Browse files Browse the repository at this point in the history
Import from sklearn.utils.validation instead
  • Loading branch information
sebp committed Dec 21, 2024
1 parent 4b7e664 commit ba2f311
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sksurv/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import numpy as np
from sklearn.utils import check_consistent_length
from sklearn.utils.validation import check_consistent_length

__all__ = ["StepFunction"]

Expand Down
3 changes: 1 addition & 2 deletions sksurv/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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
Expand Down
3 changes: 1 addition & 2 deletions sksurv/svm/naive_survival_svm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sksurv/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit ba2f311

Please sign in to comment.