logreg() — Logistic regression

Predicts a probability between 0 and 1 with an S-shaped curve.

logreg(X, y)

Key idea

Definition

the intercept
the slope (effect of x)
about 2.718
the predicted probability of class 1

In plain words

Instead of a yes/no jump, it draws a smooth ramp from almost certainly no up to almost certainly yes.

Where you'd use it

Frequently asked questions

What does logistic regression predict?
The probability of a class, via the log-odds. Each coefficient shifts the log-odds; exponentiate it (ecoef) to get an odds ratio.