Introduction
Logistic regression is one of the most widely used classifiers in the world — in medicine, banking, marketing and as a baseline in almost every ML project. Despite its name, it's a classification model: it estimates the probability that an example belongs to a class.
- "This email is spam with probability 0.93."
- "This patient has a 12% chance of the disease."
- "This customer is 40% likely to cancel."
It works in two steps, and you already know the first one:
- compute a linear score — a weighted sum of the features, exactly like linear regression;
- squash that score into a probability between 0 and 1 using the sigmoid function.