0
PythonでELM(極限学習機械)を使用しているとき、この問題が発生しました:ImportError:atleast2d_or_csr.という名前をインポートできません。エラーの詳細は次のとおりです。scikit-learn:ImportError:名前をインポートできませんatleast2d_or_csr
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
懸念の文は次のようになります。
from sklearn.utils import check_random_state, atleast2d_or_csr
あなたはこれをチェックすることをお勧めします:https://github.com/scikit-learn/scikit-learn/issues/4457と10 – Deuce