LogisticRegressionのsolverはデフォルト値が変わっていてハマりかけた



LogisticRegressionで下のエラーが起きた。
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(

調べるとsolverのデフォルト値が変わったから試行回数を増やすか「solver='liblinear'」にすることで直るらしい。
とりあえずsolverを指定して回避した。



コメント

このブログの人気の投稿

FLEXISPOT昇降デスクでASR(A5R)が表示されたら下限まで下げてから下ボタンを長押しすると直る

FLEXISPOT昇降デスクで異音がしたらコントロールボックスを交換してくれた

Obsidian Memosをもっと手軽にしたいからiPhoneのショートカットを作った