
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































Given labeled data (xi, yi), i=1,..,n, where y is +1 or -1 , Find a hyperplane through the origin to separate + from - w : normal vector to the hyperplane For a point x on one side of the hyperplane, w, x > 0 For a point x on the other side, w, x < 0
Goal: Given labeled data (xi, yi), i=1,..,n, where y is +1 or -1 , Find a vector w such that the corresponding hyperplane separates + from - Perceptron Algorithm:
γ = min x∈S |w, x| x min cosine of angle between w and x, for any x in S
γ = min x∈S |w, x| x min cosine of angle between w and x, for any x in data
Perceptron: Voted Perceptron:
Averaged Perceptron: How to classify example x?
m
i=
How to classify example x?
m
i=
Voted: sign( m i= cisign(wi, x)) Example where voted and averaged are different: w 1 = x 1 , w 2 = x 2 , w 3 = x 3 , c 1 = c 2 = c 3 = 1 Averaged: x 1 + x 2 + x 3 > 0 Voted: Any two of x 1 , x 2 , x 3 > 0
Data: ( (4, 0), +1), ( (1, 1), -1), ( (0, 1), -1), ( (-2,-2), +1) Step 1: w 1 = (4, 0), c 1 = 1 O w 1 Decision Boundary
Data: ( (4, 0), +1), ( (1, 1), -1), ( (0, 1), -1), ( (-2,-2), +1) Step 2: (x2, y 2 ) = ( (1, 1), -1) Step 1: w 1 = (4, 0), c 1 = 1 O Decision Boundary w 1 x 2
Data: ( (4, 0), +1), ( (1, 1), -1), ( (0, 1), -1), ( (-2,-2), +1) Step 2: (x2, y 2 ) = ( (1, 1), -1) y 2 w 1 , x 2 < (^0) Mistake! Step 1: w 1 = (4, 0), c 1 = 1 Update: w 2 = (3, -1), c 2 = 1 O -x 2 w 2 Decision Boundary w 1 x 2
Data: ( (4, 0), +1), ( (1, 1), -1), ( (0, 1), -1), ( (-2,-2), +1) Step 2: (x2, y 2 ) = ( (1, 1), -1) y 2 w 1 , x 2 < (^0) Mistake! Step 3: (x3, y 3 ) = ( (0, 1), -1) Step 1: w 1 = (4, 0), c 1 = 1 Update: w 2 = (3, -1), c 2 = 1 O w 2 Decision Boundary w 1 x 3 x 2