0

The title may be confusing so let me show for demonstration purpose a one-dimensional feature vector

x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

and the corresponding labels

y = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]

A logistic regression model may lead to the following curve

enter image description here

Now suppose the labels actually look like this

y2 = [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0]

The corresponding curve after training could look like this:

enter image description here

As we can see, this model clearly doesn't describe the data well. Is there a "prerequisite" that disallows logistic regression models to be used when the shown case happens? Are there any "standard" models that can describe the data more accurately?

  • 1
    Search our site for "spline." For another approach see https://stats.stackexchange.com/a/64039/919. BTW, in your first example there is no unique solution: this is a "perfect separation" case. – whuber Jan 14 '21 at 19:51
  • That link was pretty helpful, thanks! – Christian Vorhemus Jan 15 '21 at 09:40

0 Answers0