Docsity

Perceptron Learning Algorithm: Separating Hyperplanes and Optimization, Study notes of Statistics

Partial preview of the text

Download Perceptron Learning Algorithm: Separating Hyperplanes and Optimization and more Study notes Statistics in PDF only on Docsity!

Perceptron Learning Algorithm

Jia Li

Department of Statistics The Pennsylvania State University

Email: [email protected] http://www.stat.psu.edu/∼jiali

Separating Hyperplanes

I (^) Construct linear decision boundaries that explicitly try to separate the data into different classes as well as possible. I (^) Good separation is defined in a certain form mathematically. I (^) Even when the training data can be perfectly separated by hyperplanes, LDA or other linear methods developed under a statistical framework may not achieve perfect separation.

Review of Vector Algebra

I (^) A hyperplane or affine set L is defined by the linear equation:

L = {x : f (x) = β 0 + βT^ x = 0}.

I (^) For any two points x 1 and x 2 lying in L, βT^ (x 1 − x 2 ) = 0, and hence β∗^ = β/ ‖ β ‖ is the vector normal to the surface of L. I (^) For any point x 0 in L, βT^ x 0 = −β 0. I (^) The signed distance of any point x to L is given by

β∗T^ (x − x 0 ) =

‖ β ‖

(βT^ x + β 0 )

‖ f ′(x) ‖

f (x).

I (^) Hence f (x) is proportional to the signed distance from x to the hyperplane defined by f (x) = 0.

Stochastic Gradient Descent

I (^) To minimize D(β, β 0 ), compute the gradient (assuming M is fixed):

∂D(β, β 0 ) ∂β

i∈M

yi xi ,

∂D(β, β 0 ) ∂β 0

i∈M

yi.

I (^) Stochastic gradient descent is used to minimize the piecewise linear criterion. I (^) Adjustment on β, β 0 is done after each misclassified point is visited.

I (^) The update is:

( β β 0

β β 0

  • ρ

yi xi yi

Here ρ is the learning rate, which in this case can be taken to be 1 without loss of generality. (Note: if βT^ x + β 0 = 0 is the decision boundary, λβT^ x + λβ 0 = 0 is also the boundary.)

Optimal Separating Hyperplanes

I (^) Suppose the two classes can be linearly separated. I (^) The optimal separating hyperplane separates the two classes and maximizes the distance to the closest point from either class. I (^) There is a unique solution. I (^) Tend to have better classification performance on test data. I (^) The optimization problem:

max β,β 0

C

subject to

‖ β ‖

yi (βT^ xi + β 0 ) ≥ C , i = 1, ..., N

I (^) Every point is at least C away from the decision boundary βT^ x + β 0 = 0.

I (^) The Lagrange sum is:

LP = min β,β 0

‖ β ‖^2 −

∑^ N

i=

ai [yi (βT^ xi + β 0 ) − 1].

I (^) Setting the derivatives to zero, we obtain:

β =

∑^ N

i=

ai yi xi ,

∑^ N

i=

ai yi.

I (^) Substitute into LP , we obtain the Wolfe dual

LD =

∑^ N

i=

ai −

∑^ N

i=

∑^ N

k=

ai ak yi yk xiT xk

subject to ai ≥ 0.

This is a simpler convex optimization problem.