scikit-learn MLPRegressor函数出现ConvergenceWarning

ConvergenceWarning: Stochastic Optimizer: Maximum iterations (200) reached and the optimization hasn't converged yet. % self.max_iter, ConvergenceWarning)

其实就是迭代了200次但是还是没达到最佳拟合,只需要在创建MLPRegressor的时候加一个

max_iter=10000

就行了,这个最高迭代10000次

clf = MLPRegressor( hidden_layer_sizes=(1, 5),
                    activation='logistic',
                    solver='sgd',
                    alpha=1e-5,
                    random_state=1,
                    max_iter=200)





你可能感兴趣的:(机器学习,scikit-learn,MLPRegressor)