diff --git a/README.rst b/README.rst index bfebdd8d6..d1745d031 100644 --- a/README.rst +++ b/README.rst @@ -28,15 +28,15 @@ .. _Black: :target: https://github.com/psf/black .. |PythonMinVersion| replace:: 3.8 -.. |NumPyMinVersion| replace:: 1.17.3 -.. |SciPyMinVersion| replace:: 1.3.2 -.. |ScikitLearnMinVersion| replace:: 1.0.2 +.. |NumPyMinVersion| replace:: 1.23.5 +.. |SciPyMinVersion| replace:: 1.5.2 +.. |ScikitLearnMinVersion| replace:: 1.2.2 .. |MatplotlibMinVersion| replace:: 3.1.2 .. |PandasMinVersion| replace:: 1.0.5 .. |TensorflowMinVersion| replace:: 2.4.3 .. |KerasMinVersion| replace:: 2.4.3 .. |SeabornMinVersion| replace:: 0.9.0 -.. |PytestMinVersion| replace:: 5.0.1 +.. |PytestMinVersion| replace:: 5.3.1 imbalanced-learn ================ diff --git a/doc/common_pitfalls.rst b/doc/common_pitfalls.rst index a08999a14..1db13c5c0 100644 --- a/doc/common_pitfalls.rst +++ b/doc/common_pitfalls.rst @@ -54,9 +54,10 @@ increase the effect of the wrongdoings:: Let's first check the balancing ratio on this dataset:: >>> y.value_counts(normalize=True) + class <=50K 0.98801 >50K 0.01199 - Name: class, dtype: float64 + Name: proportion, dtype: float64 To later highlight some of the issue, we will keep aside a left-out set that we will not use for the evaluation of the model:: diff --git a/imblearn/_min_dependencies.py b/imblearn/_min_dependencies.py index aaa5ce9ae..9fa811468 100644 --- a/imblearn/_min_dependencies.py +++ b/imblearn/_min_dependencies.py @@ -1,15 +1,15 @@ """All minimum dependencies for imbalanced-learn.""" import argparse -NUMPY_MIN_VERSION = "1.17.3" -SCIPY_MIN_VERSION = "1.3.2" +NUMPY_MIN_VERSION = "1.23.5" +SCIPY_MIN_VERSION = "1.5.2" PANDAS_MIN_VERSION = "1.0.5" -SKLEARN_MIN_VERSION = "1.0.2" +SKLEARN_MIN_VERSION = "1.2.2" TENSORFLOW_MIN_VERSION = "2.4.3" KERAS_MIN_VERSION = "2.4.3" JOBLIB_MIN_VERSION = "1.1.1" THREADPOOLCTL_MIN_VERSION = "2.0.0" -PYTEST_MIN_VERSION = "5.0.1" +PYTEST_MIN_VERSION = "5.3.1" # 'build' and 'install' is included to have structured metadata for CI. # It will NOT be included in setup's extras_require diff --git a/imblearn/ensemble/_bagging.py b/imblearn/ensemble/_bagging.py index e35343f27..705a9e101 100644 --- a/imblearn/ensemble/_bagging.py +++ b/imblearn/ensemble/_bagging.py @@ -10,13 +10,12 @@ import warnings import numpy as np -from joblib import Parallel from sklearn.base import clone from sklearn.ensemble import BaggingClassifier from sklearn.ensemble._bagging import _parallel_decision_function from sklearn.ensemble._base import _partition_estimators from sklearn.tree import DecisionTreeClassifier -from sklearn.utils.fixes import delayed +from sklearn.utils.parallel import Parallel, delayed from sklearn.utils.validation import check_is_fitted from ..base import _ParamsValidationMixin diff --git a/imblearn/ensemble/_easy_ensemble.py b/imblearn/ensemble/_easy_ensemble.py index 2ec31e55d..8d210d91f 100644 --- a/imblearn/ensemble/_easy_ensemble.py +++ b/imblearn/ensemble/_easy_ensemble.py @@ -10,12 +10,11 @@ import warnings import numpy as np -from joblib import Parallel from sklearn.base import clone from sklearn.ensemble import AdaBoostClassifier, BaggingClassifier from sklearn.ensemble._bagging import _parallel_decision_function from sklearn.ensemble._base import _partition_estimators -from sklearn.utils.fixes import delayed +from sklearn.utils.parallel import Parallel, delayed from sklearn.utils.validation import check_is_fitted from ..base import _ParamsValidationMixin diff --git a/imblearn/ensemble/_forest.py b/imblearn/ensemble/_forest.py index 4714b703a..a454f81a5 100644 --- a/imblearn/ensemble/_forest.py +++ b/imblearn/ensemble/_forest.py @@ -9,7 +9,6 @@ import numpy as np import sklearn -from joblib import Parallel from numpy import float32 as DTYPE from numpy import float64 as DOUBLE from scipy.sparse import issparse @@ -24,8 +23,8 @@ from sklearn.exceptions import DataConversionWarning from sklearn.tree import DecisionTreeClassifier from sklearn.utils import _safe_indexing, check_random_state, parse_version -from sklearn.utils.fixes import delayed from sklearn.utils.multiclass import type_of_target +from sklearn.utils.parallel import Parallel, delayed from sklearn.utils.validation import _check_sample_weight from ..base import _ParamsValidationMixin