Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't seem to import scikit-learn's MLPRegressor

So I'm trying to use scikit-learn's MLPRegressor, but python keeps spitting back an ImportError: No module named MLPRegressor. I'm currently trying to use the syntax from sklearn.neural_network import MLPRegressor. I've uninstalled and reinstalled sklearn using Anaconda, and it still makes no difference.

I've tried to import it in several times, but I keep getting a different error, such as NameError: name 'MLPRegressor' is not defined by just including import sklearn.neural_network.MLPRegressor and then calling the constructor or AttributeError: 'module' object has no attribute 'MLPRegressor' by calling the constructor with sklearn.neural_network.MLPRegressor.

How should I go about fixing this?

like image 321
podington Avatar asked Jan 05 '16 17:01

podington


1 Answers

Could it be the scikit version? I can only find documentation for MLPRegressor in scitkit-learn 0.18. The stable version is 0.17.

http://scikit-learn.org/dev/modules/generated/sklearn.neural_network.MLPRegressor.html

like image 83
Jimmy Avatar answered Nov 15 '22 16:11

Jimmy