Skip to content

[Solved] ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED L

Last Updated on 2021-10-30 by Clay

The full error message as follows:

Start to train the model.
\sklearn\linear_model\_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1):

STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.

Increase the number of iterations (max_iter) or scale the data as shown in:
    https://scikit-learn.org/stable/modules/preprocessing.html
Please also refer to the documentation for alternative solver options:
    https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression  n_iter_i = _check_optimize_result(

\sklearn\linear_model\_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1):

STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.

Increase the number of iterations (max_iter) or scale the data as shown in:
    https://scikit-learn.org/stable/modules/preprocessing.html
Please also refer to the documentation for alternative solver options:
    https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression  n_iter_i = _check_optimize_result(


The meaning of the error message is lbfgs cannot converge because the iteration number is limited and aborted.


Solution

There are three solutions:

  • Increase the iterable number (max_iter default is 100)
  • Reduce the data scale
  • Change the solver

References


Read More

2 thoughts on “[Solved] ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED L”

  1. Pingback: Lbfgs Failed To Converge? Top 9 Best Answers - Ar.taphoamini.com

  2. Pingback: Best 14 Stop: Total No. Of Iterations Reached Limit. - Ôn Thi HSG

Leave a ReplyCancel reply

Exit mobile version