2.2.16 · D1Linear & Logistic Regression

Foundations — Interpreting model coefficients

2,633 words12 min readBack to topic

This page assumes nothing. If you have never seen a subscript or the letter , start here and read top to bottom. Every symbol is earned before it is used again.


0. The picture we keep returning to

Before any symbol, hold this image: a machine with dials. You feed in numbers (the features), each dial has a strength setting (the coefficient), and out comes a prediction. Interpreting coefficients = reading the dial strengths.

Figure — Interpreting model coefficients

Keep this machine in mind — every symbol below is a labelled part of it.


1. A feature: the input number

We write a feature as the letter . When there are several features, we number them with a small subscript — a tiny number written below and to the right:

The letter is a stand-in — a placeholder that means "pick any one of them." When we say "feature ," read it as "whichever feature we happen to be talking about right now."

If there are features total, they run up to . Here is just "how many features there are" — a plain count, nothing more. (We deliberately use , not , because we will soon need for probability and don't want two look-alike symbols fighting for the same letter.)


2. The prediction: the output

The plain letter means the true answer — the real house price, the real yes/no of disease.

But the machine doesn't know the truth; it produces a guess. We mark a guess with a hat:


3. The coefficient: dial strength

is the Greek letter beta (say "BAY-tuh"). It is just a name — we use a Greek letter so it never gets confused with a feature () or an answer ().

There is one special coefficient with subscript :


4. Putting the machine together: the linear equation

Now we can assemble the parent note's central line, symbol by symbol:

Read it as a sentence:

  • Start at the baseline .
  • For each feature, multiply its slider position by its dial strength .
  • Add all those pushes together.

The signs matter: this machine adds contributions. That is exactly why the parent's mnemonic says "Linear adds."

Figure — Interpreting model coefficients

5. "One unit" and "holding others fixed"

The parent note leans hard on the phrase "increase by one unit, holding the others fixed." Two ideas hide in there.

Figure — Interpreting model coefficients

6. The slope idea: change over change

The parent calls a slope and even a partial derivative. You do not need calculus to get the picture.

The fancy symbol ("partial derivative") is just formal notation for "the slope in the direction while the other sliders are frozen." The curly (say "partial dee") is a "d" that means "we're varying only this one variable." So:

is nothing more than "the slope along feature equals its dial strength." Same idea, formal clothing.


7. The second world: probability, odds, and the log

Linear regression outputs a number that can be anything. But some questions are yes/no (rain / no rain, disease / no disease). For those we need a few more symbols. See Logistic Regression and Odds and Log-Odds for the full story; here we just define the pieces.

Two symbols in that line need unpacking:

  • (Greek "pie") is our name for the predicted probability. We use not the letter — so it never collides with a feature count. It has nothing to do with the circle number ; it's just a label.
  • reads "the Probability that the true answer equals , given () the whole feature vector ." The bar means "given that we know," and is the full slider setting from §1.

Now we can write the logistic machine itself — the exact bridge the parent note builds on. The left side is the stretched output; the right side is the same additive machine from §4:

The partner symbol is , the special number . It undoes the logarithm: if then . So exponentiating () turns an added effect on log-odds back into a multiplied effect on odds — the parent's "Logistic multiplies."

Figure — Interpreting model coefficients

8. Three Greek helpers for scaling: , , and

To compare dials fairly across different-sized sliders, the parent standardizes features. That brings a few more symbols from Feature Scaling & Standardization.

The clump reads: "how many typical spreads is this value away from its average?" Subtract the mean () to centre it, divide by the spread () to rescale it. That is all standardization does.


Prerequisite map

The chain below shows, in plain arrows, which idea you need before the next one makes sense — read it left as "comes first," right as "builds on it."

feature x_j and vector x

linear machine y-hat

coefficient beta_j

slope reading equals beta_j

logistic machine log-odds

probability pi

odds

number e undoes log

odds ratio e to the beta

mean mu and spread sigma

standardized z

compare dials fairly

Interpreting model coefficients

If any box on the left is fuzzy, re-read its section above before moving right.


Equipment checklist

Cover the right side; say the answer aloud before revealing.

What does mean?
The -th feature — one measured input; the subscript is just a name tag.
What does bold mean?
The whole feature vector — all slider positions of one example at once.
What does the hat in signal?
It's the model's predicted value, not the true answer .
What is in the machine picture?
The strength (tightness) of the dial attached to feature .
What is ?
The intercept — the output when every feature equals zero (the baseline).
Why does linear regression add the terms ?
Each feature contributes an independent, fixed push per unit; the total is their sum.
What does "holding others fixed" mean physically?
Freeze every other slider, move only slider , and watch the output change.
What is a slope, in plain words?
Output change divided by input change — the tilt of the line.
Why use instead of for probability here?
To avoid clashing with a feature count; is just a label for the predicted chance of "yes," unrelated to .
Write the logistic regression core equation.
.
Why do we use odds instead of raw probability for the yes/no machine?
Probability is stuck in ; odds range from to , giving the straight line room.
What does the (log-odds) achieve?
It stretches onto the whole number line so an additive machine can fit.
What does the number do to ?
It undoes it — when ; so turns an added log-odds effect into a multiplied odds effect.
What does compute?
How many typical spreads a value sits from its average (its standardized score).

Connections