Skip to content

Fixing imports for sklearn 1.2.1 #987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
================
Expand Down
3 changes: 2 additions & 1 deletion doc/common_pitfalls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down
8 changes: 4 additions & 4 deletions imblearn/_min_dependencies.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions imblearn/ensemble/_bagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions imblearn/ensemble/_easy_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions imblearn/ensemble/_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down