Reputation:
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?
Upvotes: 5
Views: 6347
Reputation: 136
How about setting hidden_layer_sizes
and max_iter
parameters?
mlp = MLPClassifier(solver='lbfgs', hidden_layer_sizes=[100], max_iter=2000, activation='logistic')
Upvotes: 3