Interpretatiof Logistic Regression
Interpretatiof Logistic Regression
Interpretatiof Logistic Regression
Logistic Regression
MNIST Data Set
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 43 198 253 254 253 247 175 175 235 253 253 108 0 0 0 0 0 0 0
0 0 0 0 13 229 253 254 192 253 253 253 254 253 137 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 43 198 253 254 253 247 175 175 235 253 253 108 0 0 0 0 0 0 0
0 0 0 0 13 229 253 254 192 253 253 253 254 253 137 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 43 198 253 254 253 247 175 175 235 253 253 108 0 0 0 0 0 0 0
0 0 0 0 13 229 253 254 192 253 253 253 254 253 137 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 43 198 253 254 253 247 175 175 235 253 253 108 0 0 0 0 0 0 0
X=
0 0 0 0 0 0 0 0 0 69 241 227 136 200 253 253 253 254 192 34 0 0 0 0 0 0 0 0
0 0 0 0 13 229 253 254 192 253 253 253 254 253 137 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Output is Binary
bM
b1
xi1 xiM
– 0.1
σ( x – 0.0
– –0.1
)
– –0.2
– 0.2
– 0.1
σ( – 0.0
– –0.1
) = 0.006
– –0.2
– 0.1
σ( – 0.0
– –0.1
) = 0.006
– –0.2
– 0.2
– 0.1
σ( – 0.0
– –0.1
) = 0.991
– –0.2
– 0.1
σ( – 0.0
– –0.1
) = 0.991
– –0.2
– 0.1
σ( x – 0.0
– –0.1
) = 0.006
(6% chance it is a 1)
– –0.2
– 0.2
– 0.1
σ( x – 0.0
– –0.1
) = 0.991
(99.1% chance it is a 1)
– –0.2
b
x x x
Σ
m=1
xim X bm
b1 b2 bM
Interpretation of
Logistic Regression
zi = (b1 x xi1) + (b2 x xi2) + + (bM x xiM) + b0
xi1 xi2 xiM
add up the M products
xi
M
b
x x x
Σ
m=1
xim X bm
b1 b2 bM
Compact Notation: xi ⊙b
Interpretation of
Logistic Regression
zi = (b1 x xi1) + (b2 x xi2) + + (bM x xiM) + b0
xi1 xi2 xiM
add up the M products
xi
M
b
x x x
Σ
m=1
xim X bm
b1 b2 bM
Compact Notation: xi ⊙b
inner product
Interpretation of Model
– 0.1
– 0.0
examples of class y = 0
– –0.1
– –0.2
filter
examples of class y = 1
Data Source: MNIST Dataset by LeCun et al. (1999) / CC-by-SA 3.0
Interpretation of Model
– 0.1
– 0.0
examples of class y = 0
– –0.1
– –0.2
filter
examples of class y = 1
Data Source: MNIST Dataset by LeCun et al. (1999) / CC-by-SA 3.0
Interpretation of Model
– 0.1
– 0.0
examples of class y = 0
– –0.1
– –0.2
filter b
examples of class y = 1
Data Source: MNIST Dataset by LeCun et al. (1999) / CC-by-SA 3.0
Interpretation of Model
– –0.2
filter b
examples of class y = 1
Data Source: MNIST Dataset by LeCun et al. (1999) / CC-by-SA 3.0
Interpretation of
Logistic Regression
zi = (b1 x xi1) + (b2 x xi2) + + (bM x xiM) + b0
Sigmoid Function p(yi = 1|xi) = σ(zi)
1
– 0.2
– 0.1
– 0.0
0.5
– –0.1
– –0.2
–6
0 zi filter b
–4 –2 0 2 4 6