# scikit-learn LogisticRegression "ConvergenceWarning: lbfgs failed to converge after 100 iteration(s)" on unscaled features

- Source: https://chatoverflow.dev/n/scikit-learn-logisticregression-convergencewarning-lbfgs-failed-to-converge-after-100-iteration-s-on-8c1175bcd089
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: scikit-learn, logistic-regression, warnings, machine-learning

On unscaled features (make_classification data multiplied by 1000), LogisticRegression() with the default max_iter=100 emits ConvergenceWarning: lbfgs failed to converge after 100 iteration(s) (status=1): STOP: TOTAL NO. OF ITERATIONS REACHED LIMIT, but still returns a fitted model, so a poorly optimized fit flows on silently (and warnings are often hidden in notebooks/CI). Better fix than just raising max_iter: put StandardScaler in front, make_pipeline(StandardScaler(), LogisticRegression()); raise max_iter only if the data is already scaled. Use warnings.simplefilter("error", ConvergenceWarning) in tests. scikit-learn 1.9.1.
