当前位置: 代码迷 >> 综合 >> 【Python】ConvergenceWarning: Maximum number of iterations 200 reached. Increase it to improve...
  详细解决方案

【Python】ConvergenceWarning: Maximum number of iterations 200 reached. Increase it to improve...

热度:29   发布时间:2024-02-23 00:35:42.0

ConvergenceWarning: Maximum number of iterations 200 reached. Increase it to improve convergence.
" improve convergence." % max_iter, ConvergenceWarning)

nmf = NMF(n_components=10, random_state=1)

问题是迭代了200次但是还是没达到最佳拟合,需要在创建NMF的时候加一下max_iter=10000

nmf = NMF(n_components=10, random_state=1, max_iter=10000)
  相关解决方案