I am trying to learn Neural Networks via the Keras Deep Learning Library in Python. I am using Python 3 and referencing this link: Tutorial Link
I try to run the code below but get the following error:
ImportError: No module named 'sklearn.model_selection'
import numpy
import pandas
from keras.models import Sequential
from keras.layers import Dense
from keras.wrappers.scikit_learn import KerasRegressor
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
Any help is greatly appreciated!
I think you install wrong version of sklearn.
Please try this:
import sklearn
print (sklearn.__version__)
0.17.1
If your version is below 0.18, please update with pip install -U scikit-learn
or pip3 install -U scikit-learn
If you have import Error
, please install sklearn with pip install scikit-learn
or pip3 install scikit-learn
Try this for python3
pip3 install -U scikit-learn
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With