SKlearn import MLPClassifier fails

前端 未结 4 1998
孤城傲影
孤城傲影 2021-01-03 18:48

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

4条回答
  •  佛祖请我去吃肉
    2021-01-03 19:03

    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

提交回复
热议问题