8
$\begingroup$

There are already posts about warnings from R dealing with logistic regression and linear separation such as this one. I just wanna make sure if in Python Scikit Learn this problem is all solved by the L1/L2 regularization part in the optimization function. In other words, it's safe to say users will not get any infinite MLE estimates warnings from sklearn.linear_model.LogisticRegression?

$\endgroup$
7
$\begingroup$

Yes, sklearn.linear_model.LogisticRegression uses penalized logistic regression which "solves" the problem of perfect separation. If you set C to something too large, you might still end up with bad results, though.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.