成功解决ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED L

简介: 成功解决ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED L


目录

解决问题

解决思路

解决方法


 

 

 

解决问题

F:\Program Files\Python\Python36\lib\site-packages\sklearn\linear_model\_logistic.py:764: 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

 extra_warning_msg=_LOGISTIC_SOLVER_CONVERGENCE_MSG)

 

 

解决思路

收敛警告:lbfgs无法聚合(状态=1):

停止:迭代总数达到限制。

增加迭代次数(最大值)或缩放数据,如中所示:https://scikit-learn.org/stable/modules/preprocessing.html

另请参阅文档以了解其他解算器选项:https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression%20%C2%A0%20extra_warning_msg=_LOGISTIC_SOLVER_CONVERGENCE_MSG)

 

解决方法

迭代总数达到限制。增加迭代次数(最大值)或缩放数据.scikit-learn版本问题导致的匹配警告和收敛警告,调用的函数和方法已经有改变,暂时不处理也不会影响程序运行。

建议升级版本或者修改为最新版本的用法,合理使用库函数!

 

相关文章
|
2月前
|
编译器 C语言
成功解决“Run-Time Check Failure #2 - Stack around the variable ‘arr‘ was corrupted.“问题
成功解决“Run-Time Check Failure #2 - Stack around the variable ‘arr‘ was corrupted.“问题
105 1
|
12天前
|
JSON 数据格式
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
15 0
|
2月前
|
NoSQL Redis
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
|
2月前
|
前端开发
Fatal error_ ENOSPC_ System limit for number of file watchers reached, watch '...path...'
Fatal error_ ENOSPC_ System limit for number of file watchers reached, watch '...path...'
29 0
|
11月前
|
数据安全/隐私保护
Do Sync Disk 0 Part 0 Failed, code=S3_F42, msg=Sync Failed after retry 5 times
Do Sync Disk 0 Part 0 Failed, code=S3_F42, msg=Sync Failed after retry 5 times
154 1
|
11月前
ERR Errors trying to SHUTDOWN. Check logs.
ERR Errors trying to SHUTDOWN. Check logs.
66 0
|
网络协议
Job for named.service failed because the control process exited with error code.
Job for named.service failed because the control process exited with error code.
643 0
【WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, st】
【WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, st】
155 0
‘Client‘ is not allowed to run in parallel.Would you like to stop the running one?
‘Client‘ is not allowed to run in parallel.Would you like to stop the running one?
480 0
‘Client‘ is not allowed to run in parallel.Would you like to stop the running one?
gconf-sanity-check-2 exited with status 256
gconf-sanity-check-2 exited with status 256