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
No module named model_selection?how fix it? #314
Comments
+1 |
The train_test_split was moved to the model_selection from cross_validation in 0.18 of scikit-learn. Please update scikit-learn to 0.18. |
Yes, you should update to the latest version of scikit-learn. On your command line, enter:
or
if you use the Anaconda distribution. |
@MrLevo520, did this solve your issue? |
I was having the same issue and upgrading to 0.18 solved it. |
@rhiever I had to |
Edited my comment above. |
@rhiever When I try conda update scikit-learn, I am getting this error `PackageNotInstalledError: Package is not installed in prefix. ` |
Did you try |
after updating the scikit learn when i was import i am getting the error like it ImportError: cannot import name 'comb' |
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. |
What version of TPOT and what version of sklearn are you using? Do you have
XGBoost installed, and if so, what version?
On Wed, Aug 8, 2018 at 10:59 PM Rootmannii ***@***.***> wrote:
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)
THis keeps showing after I did the update
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#314 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABo7t2IV9OORd2gEE-3PWqXjTu55BGTmks5uO7OJgaJpZM4Kwsbj>
.
--
Cheers,
Randal S. Olson, Ph.D.
E-mail: rso@randalolson.com | Twitter: @randal_olson
<https://twitter.com/randal_olson>
http://www.randalolson.com
|
The former code "from sklearn.crossvalidation import traintest_split" has deprecated. The new one is below. I had the same problem, now it's gone. "from sklearn.modelselection import traintest_split" |
I am still facing the same issue ModuleNotFoundError Traceback (most recent call last) ModuleNotFoundError: No module named 'sklearn.modelselection' NOTE: If your import is failing due to a missing package, you can To view examples of installing some common dependencies, click the |
@vaibhavagarwa @cakmakaf what is the version of scikit-learn in your environment? |
the best answer |
Hello guys i have the same problem knowing that the sklearn version is (0.21.2) and model selection worked before |
@mhrihab I am also facing the same issue with the sklearn version (0.21.2) . model_selection is getting imported but not working |
I am also having this issue even though my sklearn version is 0.21.2 |
Hmm, is this issue reproducible in a newly-built conda environment with sklearn 0.21.2? |
what i do?? ModuleNotFoundError: No module named 'sklearn.cross_validation' |
@gulabshah778 which version of TPOT? Maybe updating TPOT will help you solve the issue. |
If you are still having issue, please try this. It worked for me. from sklearn.model_selection import train_test_split |
I still getting the error even when I changed the cross_validation by from sklearn.cross_validation import train_test_split ImportError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\sklearn\model_selection_init_.py in ~\Anaconda3\lib\site-packages\sklearn\model_selection_validation.py in ImportError: cannot import name '_check_fit_params' from 'sklearn.utils.validation' |
@EcoHub is the version of scikit-learn > 0.21? If not, please update it. Thank you |
Please use: The earlier LOC is not is use: |
hi guys, it has no this module python: 3.8.6 read your comments and not useful, can you help to fix it ? |
how can solve it. i m stuck here. from sklearn.model_selection import train_test_split ~\anaconda3\lib\site-packages\sklearn\model_selection_init_.py in ~\anaconda3\lib\site-packages\sklearn\model_selection_validation.py in ImportError: cannot import name 'delayed' from 'sklearn.utils.fixes' (C:\Users\hp\anaconda3\lib\site-packages\sklearn\utils\fixes.py) |
"from sklearn.model_selection import train_test_split"
something wrong with this ,sklearn can't find the model_selection
BTW,train_test_split can be used by "from sklearn.cross_validation import train_test_split"
The text was updated successfully, but these errors were encountered: