2.2.16 · HinglishLinear & Logistic Regression

Interpreting model coefficients

1,497 words7 min readRead in English

2.2.16 · AI-ML › Linear & Logistic Regression


HUM coefficients ki care kyun karte hain?

Hum sirf ek black box nahi chahte jo predict kare. Hum samajhna chahte hain: kaunse features matter karte hain, kis direction mein, aur kitna. Ek coefficient model ka estimated slope hai feature ke along. Ise sahi se interpret karna "smoking increases risk" aur ek meaningless number ke beech ka fark hai.


LINEAR regression coefficient ka matlab KYA hota hai?

Model: .

Interpretation ki derivation (scratch se). pe aur pe prediction lo (baaki sab fixed):

  • Intercept : predicted jab saare features 0 hon (aksar meaningless hota hai agar range ke bahar ho — isliye hum kabhi kabhi features ko center karte hain).

LOGISTIC regression coefficient ka matlab KYA hota hai?

Logistic regression log-odds model karta hai, probability nahi:

Odds-ratio interpretation ki derivation. Log-odds linear hai, toh pehle ki tarah:

Dono sides exponentiate karo. Maano :

Figure — Interpreting model coefficients

Coefficients compare KAISE karein: standardization

Tum nahi keh sakte " toh feature 1 zyada important hai" agar features alag-alag scales pe hain (income $ mein vs. age years mein). Income pe ek tiny coefficient dominate kar sakta hai kyunki income values huge hoti hain.

kyun? Agar (roughly), toh mein 1-unit change mein -unit change hai, jisse mein change aata hai.


Common mistakes (Steel-manned)


Active recall

Recall Khud test karo (hidden)
  1. Linear regression mein literally kya measure karta hai?
  2. Hum "holding others fixed" kyun kehte hain?
  3. Logistic konsi quantity ko linearly change karta hai?
  4. Logistic ko odds ratio mein kaise convert karte hain?
  5. Coefficient sizes compare karne se pehle standardize kyun karte hain?
  6. Correlated features coefficients ko unreliable kyun bana dete hain?
Recall Feynman: ek 12-saal ke bacche ko explain karo

Socho ek recipe machine hai. Har ingredient ka ek "power number" hota hai. Price machine mein, power number kehta hai ki us ingredient ka ek aur cup kitne dollars add karta hai — lekin sirf tab jab tum kuch aur na badlo. Yes/no machine mein (kya barish hogi?), power number thoda tricky hai: tumhe uspe "e" button dabana padta hai (), aur woh batata hai ki "yes" kitne times zyada likely ho jaata hai. Agar do ingredients alag-alag size ke cups mein mape gaye hain (teaspoons vs. buckets), tum tab tak unke power numbers compare nahi kar sakte jab tak same cup use na karo — yahi standardizing hai.


Connections


Linear regression: coefficient ka kya matlab hai?
mein 1-unit increase pe predicted mein change (units of mein), baaki saare features fixed rakke.
"Holding other features fixed" phrase kyun?
Kyunki ek partial effect hai; reality mein baaki features saath move kar sakte hain (correlation), toh ek ko isolate karna ek idealization hai.
Logistic regression: kya linearly change karta hai?
Log-odds, , probability nahi.
Logistic coefficient ko odds ratio mein kaise convert karein?
Exponentiate karo: odds ratio ; mein har unit increase odds ko se multiply karta hai.
Logistic regression mein odds ke liye kya matlab rakhta hai?
, toh feature odds ko 1 se multiply karta hai — koi effect nahi.
Feature importance ke liye raw coefficient magnitudes compare kyun nahi kar sakte?
Woh feature units/scale pe depend karte hain; bade numeric range wale feature ko chhota coefficient milta hai aur vice versa.
Coefficients comparable kaise banate hain?
Features standardize karo (mean ghataao, SD se divide karo); use karo = 1 SD pe effect.
Odds ratio ke liye small- approximation?
, toh ≈ +5% odds.
Correlated features coefficients ko unreliable kyun banate hain?
Multicollinearity se fit effect uniquely attribute nahi kar pata, toh coefficients ki variance zyada ho jaati hai aur sign flip ho sakta hai.
Kya significant coefficient causation prove karta hai?
Nahi — yeh association dikhata hai; causal claims ke liye causal design aur confounders ka control chahiye.

Concept Map

defined as

requires

applies in

applies in

coefficient means

coefficient means

exponentiate

includes

y when all x=0

depends on

affected by

Model coefficient beta_j

Partial derivative

Ceteris paribus

Linear regression

Logistic regression

Change in y units

Change in log-odds

Odds ratio e^beta_j

Intercept beta_0

Trustworthiness

Scaling and correlation