Skip to content
BENIBIX Learn

Linear Regression vs Logistic Regression

The names make people think both guess numbers. Only one does. Linear regression gives a number on a scale, like a rent. Logistic regression gives a chance between 0 and 1 and is used for yes or no questions. So logistic regression is a classifier, despite its name.

AI📈 Machine Learning

Linear Regression

Guessing a number with a straight line. The line is the one that best fits the data.

Linear regression is a method that guesses a number by drawing the straight line that best fits the data. Each feature gets a weight that says how much it pushes the answer up or down. Training finds the weights that make the line miss the dots by the least. It is simple, fast and easy to explain. It works best when the real link is close to a straight line.

Example
Jack plots flat size against rent for 300 flats. The best line says each extra square metre adds about 15 euros a month.
Why it matters
It is often the first model to try and the one to beat. Its weights tell you plainly what moves the answer.
Full entry
AI📈 Machine Learning

Logistic Regression

It gives the chance that something is true. Then it turns that into yes or no.

Logistic regression is a method that guesses the chance that something is true, such as the chance an email is spam. It adds up the features with weights, like linear regression does. Then it bends that sum into an S-shaped curve that always stays between 0 and 1. A cut-off, often 0.5, turns the chance into a yes or a no. Despite its name, it is used for classification.

Example
Lucy's model gives a loan request a 0.82 chance of being paid back. That is above her cut-off of 0.7, so it says approve.
Why it matters
It is fast, clear and hard to beat on simple yes or no tasks. Banks and hospitals use it because they can explain it.
Full entry

In one line

Linear Regression
Guessing a number with a straight line. The line is the one that best fits the data.
Logistic Regression
It gives the chance that something is true. Then it turns that into yes or no.