# Finding a logistic regression model which can achieve zero error on a training set training data for a binary classification problem with two features

Not sure where to begin with this question, can anyone help out?

• Is this from a book? If so can you share the title? – grayQuant Feb 27 at 20:09

Logistic regression is a linear classifier, i.e. it draws a line (2D datasets) and classifies accordingly (one side is class 0, other side is class 1). So, if classes can be distinguished by a line (or hyperplane in higher dimensions), it is said that the dataset is linearly separable, though this dataset is not. One way to tackle this issue is creating new features, or applying transformations. For example, this dataset seems to be separable if you think radially, i.e. $$R>\alpha$$, where $$R$$ is the radius, or distance to origin, which can be found by $$R=\sqrt{X_1^2+X_2^2}$$. Constructing a logistic regression using this feature only, results in perfect classification.

• By log-reg, do you mean a logistic regression model? Thanks for your help by the way! – user239276 Feb 27 at 17:53
• yes, sorry for ambiguity. – gunes Feb 27 at 17:54
• @gunes This might be a bit too much of an answer for a self-study question, although I don't typically police those here and am not certain where exactly the community falls on these sorts of questions besides what is included in the tag info. – Bryan Krause Feb 27 at 17:55
• (+1) It's worth noting that this is essentially using a very simple Radial Basis Network with logistic loss – Cliff AB Feb 27 at 18:22
• It may be worth noting that this will cause the logistic regression to not converge! The parameter estimate for R will tend to infinity! – Matthew Drury Feb 27 at 21:18

## protected by gung♦Feb 28 at 4:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).