aNet.ai
Machine Learning/Learning path
0day streak0XP · Lv 1
← 7. Classification
Lesson 2 of 6 10 min · 161 words

Logistic regression

A linear score passed through the sigmoid to get a probability.

Logistic regression models the probability of the positive class as a linear score passed through the sigmoid:

The sigmoid maps to , with , for large and for very negative . Its derivative is neat: .

Inverting gives the log-odds: . So each weight is the change in log-odds per unit of its feature; is the factor by which the odds multiply.

It is trained by minimising binary cross-entropy (equivalently, maximising likelihood). There is no closed form, but the loss is convex, so gradient descent finds the global optimum. The gradient is simply .

Formula to remember

Logistic model

Probability of the positive class.

Quick check · +5 XP

The decision boundary of plain logistic regression is…

Practice this topic
Saved in this browser as you type.
aNet.ai · Introduction to Machine Learning · NewUU course outlineProgress saved in this browser