'Multilayer perceptron in scikit-learn
I am trying to code a multilayer perceptron in scikit learn 0.18dev using MLPClassifier. I have used the solver lbgfs, however it gives me the warning : ConvergenceWarning: Stochastic Optimizer: Maximum iterations reached and the optimization hasn't converged yet. % (), ConvergenceWarning)
How can I fix this?
Solution 1:[1]
How about setting hidden_layer_sizes
and max_iter
parameters?
mlp = MLPClassifier(solver='lbfgs', hidden_layer_sizes=[100], max_iter=2000, activation='logistic')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sang-Kil Park |