Different coefficients: scikit-learn vs statsmodels (logistic regression)
Thanks to a kind soul on reddit, this was solved. To get the same coefficients, one has to negate the regularisation that sklearn
applies to logistic regression by default:
model = LogisticRegression(C=1e8)
Where C
according to the documentation is:
C : float, default: 1.0
Inverse of regularization strength; must be a positive float. Like in support vector machines, smaller values specify stronger regularization.