sc公司ikitlearn:强求:无法导入名称至少2d_或\u cs

2024-06-10 01:45:27 发布

您现在位置:Python中文网/ 问答频道 /正文

当我在python中使用ELM(极限学习机器)时,我遇到了这个问题问题:强迫症:无法导入名称至少2d\u或_企业社会责任错误详情如下:

C:\Users\sherlock\Anaconda2\lib\site-packages\sklearn\cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
Traceback (most recent call last):

File "<ipython-input-50-dad0703e9d35>", line 1, in <module>
runfile('C:/Users/sherlock/Desktop/Ensemble Learnig/Python-ELM-master
/plot_elm_comparison.py', wdir='C:/Users/sherlock/Desktop/EnsembleLearnig
/Python-ELM-master')

File "C:\Users\sherlock\Anaconda2\lib\site-packages\spyder\utils
\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)

File "C:\Users\sherlock\Anaconda2\lib\site-packages\spyder\utils  
\site\sitecustomize.py", line 87, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "C:/Users/sherlock/Desktop/Ensemble Learnig/Python-ELM-master 
/plot_elm_comparison.py", line 75, in <module>
from elm import ELMClassifier

File "elm.py", line 34, in <module>
from random_hidden_layer import SimpleRandomHiddenLayer

File "random_hidden_layer.py", line 27, in <module>
from sklearn.utils import check_random_state, atleast2d_or_csr

ImportError: cannot import name atleast2d_or_csr

相关声明可以是:

^{pr2}$

Tags: theinfrompyimportliblinesite