I am trying to use the multilayer perceptron from scikit-learn in python. My problem is, that the import is not working. All other modules from scikit-learn are working fine
I arrived here with the v0.17 problem too. I found a solution using pip here, namely
pip install git+https://github.com/scikit-learn/scikit-learn.git
I had to execute pip install cython
first though.
However, that installs 0.19.dev0
(currently), but pip list
indicates that the latest is 0.18rc2
. Rather
pip install scikit-learn==0.18.rc2
resolved the issue more satisfactorily.
from shell/ terminal
conda update scikit-learn
apt-get update; \
apt-get install -y python python-pip \
python-numpy \
python-scipy \
build-essential \
python-dev \
python-setuptools \
libatlas-dev \
libatlas3gf-base
update-alternatives --set libblas.so.3 /usr/lib/atlas-base/atlas/libblas.so.3; update-alternatives --set liblapack.so.3 /usr/lib/atlas-base/atlas/liblapack.so.3
pip install -U scikit-learn
I have imported MLPClassifier from sklearn.neural_network and it does seem to work.
You could also handle this issues by using docker images. This allows any developer to recreate the environment in any server within a single minute. You can pull the image from here
This can also be performed very easily using the datmo-cli tool. We faced these problems ourselves and decided to build it.
You could also solve this with one click using Datmo Disclaimer: I work at Datmo
MLPClassifier
is not yet available in scikit-learn
v0.17 (as of 1 Dec 2015). If you really want to use it you could clone 0.18dev
(however, I don't know how stable this branch currently is).