# If logistic regression is a linear classifier why does it fail on linearly separable data?

Logistic regression is a linear model, decision boundary generated is linear.

If the data points are linearly separable, then why does Logistic regression fail? Shouldn't it perform better on data that is actually linearly separable?

• In what sense does logistic regression actually "fail" in perfect separation cases? Exploring that issue might help you answer this question. – whuber Jun 28 at 21:27
• Estimating the parameters are not possible and the estimates become unstable. – Coderhhz Jun 28 at 21:29
• But estimating the parameters is not the same problem as determining a decision boundary. Moreover, logistic regression (carefully programmed) will find a decision boundary in the case of perfect separation. These are some of the reasons you might want to think a little about why logistic regression might be applied and the specific sense in which you mean "failure." – whuber Jun 28 at 21:37
• Logistic regression fits $E(Y|x)=P(Y=1|x)$ where the function of the linear predictor is logistic. It is not inherently a classifier, though you can make it one by drawing a line at some fitted probability (like 0.5). – Glen_b Jun 29 at 7:04
• Logistic regression is not a classifier. It is a probability model. – Frank Harrell Jun 30 at 12:42

We feel to much have been made of this. The difficulty is in inappropriate parameterization and the limits for infinite $$|| \beta > ||$$ of the fitted posterior probabilities remain perfectly suitable fits, albeit sometimes predicting probability zero or one.