amueller / introduction_to_ml_with_python

Notebooks and code for the book "Introduction to Machine Learning with Python"
7.44k stars 4.56k forks source link

Logistic Regression output with sklearn versions > 0.22 #149

Closed BerengereG closed 3 years ago

BerengereG commented 3 years ago

I have been puzzled with the output of LogisticRegression from p59 to 61. The issue is that I have been using sklearn version 0.24 and the default parameter for solver changed between version 0.20 and 0.22 from 'liblinear’ to ‘lbfgs’ + we now have to specify a max_iter parameter.

amueller commented 3 years ago

you don't have to specify it, but the default value gives you convergence warnings more often now (it's not entirely clear to me if increasing the number of iterations is the right fix, we actually just never showed convergence warnings from liblinear).