成功解决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版本问题导致的匹配警告和收敛警告,调用的函数和方法已经有改变,暂时不处理也不会影响程序运行。

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

 

相关文章
|
6月前
|
编译器 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.“问题
292 1
|
3月前
|
SQL 微服务
成功解决 :status 500 reading CouponFeignService#saveSpuBounds(SpuBoundTo)
这篇文章讲述了作者在微服务项目开发中遇到的一个具体问题:使用Feign进行远程服务调用时出现了`status 500`错误。文章详细描述了排查过程,包括检查Feign配置和被调用服务的日志信息,最终确定问题是由于Lombok插件的`@Data`注解导致。作者通过将`@Data`注解注释掉并手动生成get、set方法解决了问题,并提供了成功调用远程服务后的截图。
成功解决 :status 500 reading CouponFeignService#saveSpuBounds(SpuBoundTo)
|
5月前
|
JSON 数据格式
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
45 0
|
Java 开发工具 git
解决Error running XXXApplicationCommand line is too long.报错
解决Error running XXXApplicationCommand line is too long.报错
|
6月前
|
负载均衡 Java 应用服务中间件
Client not connected, current status:STARTING
Client not connected, current status:STARTING
555 1
|
6月前
|
前端开发
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...'
55 0
|
数据安全/隐私保护
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
191 1
|
网络协议
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.
809 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】
1421 0
|
C++
ERROR: Command errored out with exit status 1:
ERROR: Command errored out with exit status 1:
317 0
ERROR: Command errored out with exit status 1: