Logistic regression is a linear classifier that models the probability of class membership:
The sigmoid squashes the linear output to .
Training: minimize the binary cross-entropy loss:
This is the negative log-likelihood of the Bernoulli distribution → MLE.
Key properties:
- Loss is convex → unique global minimum (Convexity)
- No closed-form solution — must use gradient descent
- Decision boundary is linear: (a hyperplane)
- Outputs calibrated probabilities (unlike SVMs)
Multiclass: replace sigmoid with softmax, cross-entropy loss over classes.
The building block of neural networks: a single neuron with sigmoid activation is exactly logistic regression. A neural network stacks these with nonlinearities to learn non-linear decision boundaries.
See also: Linear Regression, The Artificial Neuron, Loss Functions