Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
These lecture notes cover the introduction to classification models in machine learning, including generative models like fisher's linear discriminative analysis and gaussian mixture models, as well as discriminative models like rosenblatt's preceptron learning algorithm. The notes also discuss nonlinear extensions and binary classification.
Typology: Study notes
1 / 9
Greg Grudic Machine Learning 1
Greg Grudic Machine Learning 2
Last Week: Learning Regression
Models
__*
__*
__*
__*
__*
__*
_ _
__*
__*
__*
__*
__*
__*
__*
__*
__*
__*
__*
__*
__*
_ _
__*
__*
__*
__*
__*
__*
__*
__*
__*
__*
__*
_ _
__*
__*
__*
__*
__*
This Class: Learning Classification
Models
Greg Grudic Machine Learning 5
inputs to a single output which can take on one of
TWO values
arbitrary!
{ }
d
Greg Grudic Machine Learning 6
x
{ }
ˆ y ∈ −1, + 1
1 1
, ,..., ,
N N
x y x y
( )
M x
comes from!
1
2
sensor 1:
sensor 2:
x
x
∈
∈
\
\
…
Example 4
Example 3
Example 2
Example 1
… … …
0.018504 0.76037 -
0.8913 0.43291 1
0.23114 0.4235 -
0.95013 0.58279 1
1
2
Greg Grudic Machine Learning 9
d
N Nd N
Greg Grudic Machine Learning 10
Graphical Representation of
Classification Training Data
0 0.2 0.4 0.6 0.8 1 1.
0
1
x
1
x
2
: y=+
: y=-
1
x
2
x
0
1
0
d
i i
i
β βx
=
0
1
0
d
i i
i
β βx
=
∑
0
1
0
d
i i
i
β βx
=
∑
y = − 1
y = + 1
Greg Grudic Machine Learning 13
0 ( 1 )
( ) sgn ,...,
T
d
y M β β β
x x
[ ]
1 if 0
sgn
1 otherwise
( ) 0 1
ˆ ˆ ˆ
,..., 0
T
d
β + β β x =
Greg Grudic Machine Learning 14
there and sometimes it won’t!
( ) 0 1
ˆ ˆ ˆ
, ,...,
d
β β β
( 0 1 )
ˆ ˆ ˆ
, ,...,
d
β β β
Rosenblatt’s Preceptron Learning
Algorithm
points that are misclassified move closer to the
correct side of the boundary
classified
( 0 1 )
d
β β β
Rosenblatt’s Preceptron Learning
Algorithm
learning examples, we can push them closer to the
boundary by minimizing the following
( ) ( ) 0 1 ( 0 1 )
T
d i d i
i M
D β β β y β β β
∈
x
0 ( 1 )
ˆ ˆ ˆ
,...,
T
d
β + β β x
x
M
Greg Grudic Machine Learning 17
Rosenblatt’s Minimization Function
( ) 0 1 0
1
d
d i k ik
i M k
D β β β y β βx
∈ =
( 0 1 )
d
β β β
Greg Grudic Machine Learning 18
0
1
2
0
1
2
3
0
5
10
15
20
25
w0 w
E[w]
( ) 0 1
ˆ ˆ ˆ
, ,...,
ˆ ˆ
ˆ
d
i i
i
D β β β
β β ρ
β
∂
← −
∂
Where the learning rate is defined by: ρ > 0
The Gradient Descent Algorithm for
the Perceptron
0 0
1 1 1
i
i i
i id
d d
y
y x
y x
β β
β β
ρ
β β
( ) 0 1
0
ˆ ˆ ˆ , ,...,
ˆ
d
i
i M
D
y
β β β
β ∈
∂
= −
∂
∑
( ) 0 1
ˆ ˆ ˆ , ,...,
, 1,...,
ˆ
d
i ij
i M j
D
y x j d
β β β
β ∈
∂
= − =
∂
∑
Greg Grudic Machine Learning 21
The Good Theoretical Properties of
the Perceptron Algorithm
Greg Grudic Machine Learning 22
Bad Theoretical Properties of the
Perceptron Algorithm
cycles forever!
steps to converge can be very large (depends on
size of gap between classes)
Greg Grudic Machine Learning 25
Greg Grudic Machine Learning 26
0
1
ˆ ( ) sgn
d
i i
i
y M β βx
=
x
( )
0
1
ˆ ( ) sgn
k
i i
i
y M β β φ
=
x x
( ) ( ) ( ) ( ) ( )
2 2
1 1 2 2 3 1 2 4 55
φ x = x φ x = x φ x = x x φ x =sin x
Linear Separating Hyper-Planes In
Nonlinear Basis Function Space
1
φ
2
φ
0
1
0
k
i i
i
β β φ
=
0
1
0
k
i i
i
β β φ
=
∑
0
1
0
k
i i
i
β β φ
=
∑
y = − 1
y = + 1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-0.
-0.
-0.
-0.
0
1
x 1
x
2
: y=+
: y=-
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
1
φ 1
= x 1
2
φ
2
= x
22
: y=+
: y=-
Φ
Greg Grudic Machine Learning 29
Greg Grudic Machine Learning 30
0
1
ˆ ˆ
ˆ ( ) sgn ,
N
i i
i
y M x β βK x x
=
= = +
1 1
, ,..., ,
N N
Training Data: x y x y
1 1 1
1
, ,
, ,
N
N N N
K K
K
K K
x x x x
x x x x
…
"
1 1
, ,..., ,
N N
x y x y
hyperparamters
classification based on prior biases
Greg Grudic Machine Learning 33
Perceptron Algorithm Convergence
basis function space
separable