Linear Predictors
COMPSCI 371D — Machine Learning
COMPSCI 371D — Machine Learning Linear Predictors 1 / 37
Linear Predictors COMPSCI 371D Machine Learning COMPSCI 371D - - PowerPoint PPT Presentation
Linear Predictors COMPSCI 371D Machine Learning COMPSCI 371D Machine Learning Linear Predictors 1 / 37 Outline 1 Definitions and Properties 2 The Least-Squares Linear Regressor 3 The Logistic-Regression Classifier 4 Probabilities and
COMPSCI 371D — Machine Learning Linear Predictors 1 / 37
1 Definitions and Properties 2 The Least-Squares Linear Regressor 3 The Logistic-Regression Classifier 4 Probabilities and the Geometry of Logistic Regression 5 The Logistic Function 6 The Cross-Entropy Loss 7 Multi-Class Linear Predictors
COMPSCI 371D — Machine Learning Linear Predictors 2 / 37
Definitions and Properties
COMPSCI 371D — Machine Learning Linear Predictors 3 / 37
Definitions and Properties
COMPSCI 371D — Machine Learning Linear Predictors 4 / 37
The Least-Squares Linear Regressor
m LT(v)
N
n=1 ℓ(yn, hv(xn))
COMPSCI 371D — Machine Learning Linear Predictors 5 / 37
The Least-Squares Linear Regressor
1000 2000 3000 4000 5000 6000 100 200 300 400 500 600 700 800 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 100 150 200 250 300 350
COMPSCI 371D — Machine Learning Linear Predictors 6 / 37
The Least-Squares Linear Regressor
COMPSCI 371D — Machine Learning Linear Predictors 7 / 37
The Logistic-Regression Classifier
COMPSCI 371D — Machine Learning Linear Predictors 8 / 37
The Logistic-Regression Classifier
1 1
COMPSCI 371D — Machine Learning Linear Predictors 9 / 37
The Logistic-Regression Classifier
0.5 1
def
1 1+e−x
COMPSCI 371D — Machine Learning Linear Predictors 10 / 37
The Logistic-Regression Classifier
COMPSCI 371D — Machine Learning Linear Predictors 11 / 37
The Logistic-Regression Classifier
600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 100 150 200 250 300 350 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 50 100 150 200 250 300 350
COMPSCI 371D — Machine Learning Linear Predictors 12 / 37
Probabilities and the Geometry of Logistic Regression
600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 50 100 150 200 250 300 350
COMPSCI 371D — Machine Learning Linear Predictors 13 / 37
Probabilities and the Geometry of Logistic Regression
COMPSCI 371D — Machine Learning Linear Predictors 14 / 37
Probabilities and the Geometry of Logistic Regression
x x0 n
Δ(x) > 0
β x᾽
Δ(x) < 0
χ positive half-space negative half-space
COMPSCI 371D — Machine Learning Linear Predictors 15 / 37
Probabilities and the Geometry of Logistic Regression
x x0 n
Δ(x) > 0
β x᾽
Δ(x) < 0
χ positive half-space negative half-space
w w
w ≥ 0
COMPSCI 371D — Machine Learning Linear Predictors 16 / 37
Probabilities and the Geometry of Logistic Regression
x x0 n
Δ(x) > 0
β x᾽
Δ(x) < 0
χ positive half-space negative half-space
w ≥ 0 and n = w w
COMPSCI 371D — Machine Learning Linear Predictors 17 / 37
Probabilities and the Geometry of Logistic Regression
def
def
COMPSCI 371D — Machine Learning Linear Predictors 18 / 37
The Logistic Function
def
1 1+e−∆
0.5 1 COMPSCI 371D — Machine Learning Linear Predictors 19 / 37
The Logistic Function
def
1 1+e−∆
0.5 1
1 1+e−∆/c ?
def
w
def
def
1 1+e−b−wT x
COMPSCI 371D — Machine Learning Linear Predictors 20 / 37
The Cross-Entropy Loss
COMPSCI 371D — Machine Learning Linear Predictors 21 / 37
The Cross-Entropy Loss
N
n=1 ℓ(yn, s(xn ; b, w))
COMPSCI 371D — Machine Learning Linear Predictors 22 / 37
The Cross-Entropy Loss
def
1 p y=1 y=0
COMPSCI 371D — Machine Learning Linear Predictors 23 / 37
The Cross-Entropy Loss
1
1
1
y=1 y=0
COMPSCI 371D — Machine Learning Linear Predictors 24 / 37
The Cross-Entropy Loss
COMPSCI 371D — Machine Learning Linear Predictors 25 / 37
The Cross-Entropy Loss
dℓ dℓ ds ds da∇a
ds = s−y s (1−s)
1 1+e−a so that ds da = s (1 − s)
ds ds da = s − y
COMPSCI 371D — Machine Learning Linear Predictors 26 / 37
The Cross-Entropy Loss
N
N
COMPSCI 371D — Machine Learning Linear Predictors 27 / 37
The Cross-Entropy Loss
COMPSCI 371D — Machine Learning Linear Predictors 28 / 37
Multi-Class Linear Predictors
COMPSCI 371D — Machine Learning Linear Predictors 29 / 37
Multi-Class Linear Predictors
2
COMPSCI 371D — Machine Learning Linear Predictors 30 / 37
Multi-Class Linear Predictors
1 1+e−a
1 1+e−a = e
a 2
e
a 2
1 1+e−a = e
a 2
e
a 2 +e− a 2
e
a1 2
e
a1 2 +e− a1 2 =
e
a1 2
e
a1 2 +e a2 2
e
a2 2
e
a1 2 +e a2 2
COMPSCI 371D — Machine Learning Linear Predictors 31 / 37
Multi-Class Linear Predictors
e
ak 2
e
a1 2 +e a2 2
eak ea1+ea2 instead
eak (x) K
j=1 eaj (x) where ak(x) = bk + wT
k x
j=1 sk(x) = 1
COMPSCI 371D — Machine Learning Linear Predictors 32 / 37
Multi-Class Linear Predictors
j=1 eaj(x)
k=1 sk(x) = 1 for all x
j=1 eaj(x) ≈ eai(x)
α→∞ aTs(αa) = max(a)
COMPSCI 371D — Machine Learning Linear Predictors 33 / 37
Multi-Class Linear Predictors
i x = bj + wT j x (equal activations ⇒ equal scores)
2
COMPSCI 371D — Machine Learning Linear Predictors 34 / 37
Multi-Class Linear Predictors
COMPSCI 371D — Machine Learning Linear Predictors 35 / 37
Multi-Class Linear Predictors
def
k=1 qk(y) log pk
COMPSCI 371D — Machine Learning Linear Predictors 36 / 37
Multi-Class Linear Predictors
COMPSCI 371D — Machine Learning Linear Predictors 37 / 37