-
Notifications
You must be signed in to change notification settings - Fork 221
Help Wanted! ModuleNotFoundError: No module named 'sklearn.cross_validation' #240
Comments
Hi! I think that the sklearn.cross_validation module is deprecated, and replaced by the sklearn.model_selection module in the newer scikit-learn versions, you could create a pull-request after correcting this in mlp.py. |
Same problem here : ModuleNotFoundError Traceback (most recent call last) D:\ProgramData\Anaconda3\lib\site-packages\sknn\mlp.py in ModuleNotFoundError: No module named 'sklearn.cross_validation' |
I have the same issue: (soph_py3) slocum:analysis sclayton$ nosetests -v sknn ======================================================================
|
Updated to import sklearn.model_selection rather than sklearn.cross_validation to try to fix issue aigamedev#240
@sophieclayton It works for me. Thank you! |
I am using most up to data Mac OS. Not sure where I am going wrong. pip and numpy are both up to date. Also when I try the command suggested:
" nosetests -v sknn "
for the test it gives me these errors:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 245, in load_module
return load_package(name, filename)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 217, in load_package
return _load(spec)
File "", line 684, in _load
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sknn/tests/init.py", line 1, in
from sknn.backend import lasagne
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sknn/backend/lasagne/init.py", line 5, in
from .mlp import MultiLayerPerceptronBackend
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sknn/backend/lasagne/mlp.py", line 22, in
import sklearn.cross_validation
ModuleNotFoundError: No module named 'sklearn.cross_validation'
Ran 1 test in 0.005s
FAILED (errors=2)
I also used the optional method with no luck
So if someone could help me out so I can use scikit-neuralnetwork.
Thank you!
The text was updated successfully, but these errors were encountered: