Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

ImportError: No module named cross_validation #30

Open
Amanda2018genetics opened this issue Feb 26, 2020 · 1 comment
Open

ImportError: No module named cross_validation #30

Amanda2018genetics opened this issue Feb 26, 2020 · 1 comment

Comments

@Amanda2018genetics
Copy link

Hi Author,
I am new to Python, so I know the problem is relate to the renaming and deprecation of cross_validation sub-module to model_selection.
But I don't know how can I fixed.
Look forward to your reply.
Yao

@fschwach
Copy link

fschwach commented Apr 6, 2020

I am running into the exact same problem. The only workaround I can see at the moment is to install sklearn version 0.16 or 0.17 which still have the cross_validation method. As far as I can see in the sklearn docs, it is not just a case of changing the name of the method in the azimuth code but the interface has changed too.
I also installed an older version of numpy into the virtualenv for azimuth: 1.12.1 because the latest version shows a deprecation warning "DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release." when used with the older sklearn module.
So in summary I installed this into my virtualenv:

$ pip install 'scikit-learn==0.17.1'
$ pip install 'numpy==1.12.1'
$ pip install azimuth

which works for now but of course it isn't great to be using outdated dependencies.

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

No branches or pull requests

2 participants