Skip to content
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

ImportError: No module named model_selection #4

Closed
jnhwkim opened this issue Nov 8, 2016 · 5 comments
Closed

ImportError: No module named model_selection #4

jnhwkim opened this issue Nov 8, 2016 · 5 comments

Comments

@jnhwkim
Copy link

jnhwkim commented Nov 8, 2016

I faced this error message after calling from mlp import MLP.
I am using tensorflow 0.10.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mlp/__init__.py", line 1, in <module>
    from .model import *
  File "mlp/model.py", line 6, in <module>
    from sklearn.model_selection import StratifiedShuffleSplit
ImportError: No module named model_selection
@jnhwkim
Copy link
Author

jnhwkim commented Nov 8, 2016

After googling, I got the model_selection module will be available from the next release (0.18) only.

Shortly, run pip install -U scikit-learn to upgrade.

@jnhwkim jnhwkim closed this as completed Nov 8, 2016
@Aswinab
Copy link

Aswinab commented Feb 1, 2019

ImportError: cannot import name 'cross_validation' from 'sklearn' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sklearn/init.py)

@Aswinab
Copy link

Aswinab commented Feb 1, 2019

how to solve this

@alvarouc
Copy link
Owner

alvarouc commented Feb 1, 2019

I think the cross_validation module is not available in sklearn any more. It needs to be updated to use model_selection instead.
feel free to contribute to the fix

@alvarouc
Copy link
Owner

alvarouc commented Feb 1, 2019

Actually, I think this was fixed. Perhaps you installed it from pip. try upgrading it from github

pip install --upgrade git+https://github.com/alvarouc/mlp/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants