Я пытаюсь импортировать SMOTE в свой блокнот jupyter. Я попробовал следующие шаги:
Сначала я установил imblearn с помощью следующей команды в моем терминале
conda install -c glemaitre imbalanced-learn
Затем я использовалследующая команда для импорта imblearn в мою записную книжку:
from imblearn import under_sampling, over_sampling
Я получаю следующую ошибку:
<ipython-input-36-d0524665b8f2> in <module>()
----> 1 from imblearn import under_sampling, over_sampling
~/anaconda3/lib/python3.6/site-packages/imblearn/under_sampling/__init__.py in <module>()
4 """
5
----> 6 from .prototype_generation import ClusterCentroids
7
8 from .prototype_selection import RandomUnderSampler
~/anaconda3/lib/python3.6/site-packages/imblearn/under_sampling/prototype_generation/__init__.py in <module>()
4 """
5
----> 6 from .cluster_centroids import ClusterCentroids
7
8 __all__ = [
~/anaconda3/lib/python3.6/site-packages/imblearn/under_sampling/prototype_generation/cluster_centroids.py in <module>()
12 from scipy import sparse
13
---> 14 from sklearn.cluster import KMeans
15 from sklearn.neighbors import NearestNeighbors
16 from sklearn.utils import safe_indexing
~/anaconda3/lib/python3.6/site-packages/sklearn/cluster/__init__.py in <module>()
4 """
5
----> 6 from .spectral import spectral_clustering, SpectralClustering
7 from .mean_shift_ import (mean_shift, MeanShift,
8 estimate_bandwidth, get_bin_seeds)
~/anaconda3/lib/python3.6/site-packages/sklearn/cluster/spectral.py in <module>()
15 from ..metrics.pairwise import pairwise_kernels
16 from ..neighbors import kneighbors_graph
---> 17 from ..manifold import spectral_embedding
18 from .k_means_ import k_means
19
~/anaconda3/lib/python3.6/site-packages/sklearn/manifold/__init__.py in <module>()
4
5 from .locally_linear import locally_linear_embedding, LocallyLinearEmbedding
----> 6 from .isomap import Isomap
7 from .mds import MDS, smacof
8 from .spectral_embedding_ import SpectralEmbedding, spectral_embedding
~/anaconda3/lib/python3.6/site-packages/sklearn/manifold/isomap.py in <module>()
9 from ..utils import check_array
10 from ..utils.graph import graph_shortest_path
---> 11 from ..decomposition import KernelPCA
12 from ..preprocessing import KernelCenterer
13
~/anaconda3/lib/python3.6/site-packages/sklearn/decomposition/__init__.py in <module>()
9 from .incremental_pca import IncrementalPCA
10 from .kernel_pca import KernelPCA
---> 11 from .sparse_pca import SparsePCA, MiniBatchSparsePCA
12 from .truncated_svd import TruncatedSVD
13 from .fastica_ import FastICA, fastica
~/anaconda3/lib/python3.6/site-packages/sklearn/decomposition/sparse_pca.py in <module>()
9 from ..utils import check_random_state, check_array
10 from ..utils.validation import check_is_fitted
---> 11 from ..linear_model import ridge_regression
12 from ..base import BaseEstimator, TransformerMixin
13 from .dict_learning import dict_learning, dict_learning_online
~/anaconda3/lib/python3.6/site-packages/sklearn/linear_model/__init__.py in <module>()
10 # complete documentation.
11
---> 12 from .base import LinearRegression
13
14 from .bayes import BayesianRidge, ARDRegression
~/anaconda3/lib/python3.6/site-packages/sklearn/linear_model/base.py in <module>()
25
26 from ..externals import six
---> 27 from ..utils import Parallel, delayed
28 from ..base import BaseEstimator, ClassifierMixin, RegressorMixin
29 from ..utils import check_array, check_X_y
ImportError: cannot import name 'Parallel
Кто-нибудь может мне помочь?Спасибо!