
Linear Classifiers
Carlos C. Rodríguez
http://omega.albany.edu:8008/
Classification with Hyperplanes
Assume we have observed n examples of labeled data
(X_{1},Y_{1}),¼,(X_{n},Y_{n}) but now let us take the labels
Y Î {1,1}. This convention simplifies some of the formulas below
and it is the standard for support vector machines.
We'll be interested in classification rules of the form,
g(x) = sgn ( < w,x > + b ) 

where < , > denotes the (euclidean) inner product in R^{d} and w Î R^{d} and b Î R parametrize all the rules of this type. These
rules are called linear. The class G of linear classifiers is
about the simplest possible way of separating two kinds of objects in
R^{d}. A classifier in G assigns the label +1 or 1 to a data
point x Î R^{d} depending on weather we arrive to x from the plane
by going in the direction of the normal w or its oposite w.
Recall that the set of vectors,
correspond to the hyperplane perpendicular to w that goes through every
point x_{0} such that, < w,x_{0} > = b . For example the following
picture shows such an hyperplane that perfectly separates the O's (with
label +1) from the X's (with label 1).
The hyperplane with parameters (w,b) is the same as the hyperplane with
parameters (cw,cb) for any nonzero scalar c. To fix the scale we say
that a plane is in canonical position with respect to a set of points
X
= {x_{1},¼,x_{n} } if,

min
i £ n

 < w,x_{i} > + b  = 1. 

Clearly, the perpendicular distance from x_{i} to the hyperplane
with parameters (w,b) is the magnitud of the projection of
(x_{i}x_{0}) onto the unit normal direction w/w. It is given by,
d_{i} = 
 < w,(x_{i}x_{0}) > 
w

= 
 < w,x_{i} > + b 
w



as it can be seen from the above picture. Thus, if we assume that the
plane is in canononical position w.r.t. {x_{i}: i £ n} then,
r = 
min
i £ n

d_{i} = 
1
w

. 

This minimun distance r is known as the margin between a separating
hyperplane and the points w.r.t. which that plane is in general position.
Maximum Margin Classifiers
When there is a hyperplane with
parameters (w,b) that separates the points {x_{i}: y_{i} = 1, i £ n}
from the points {x_{i}: y_{i} = 1, i £ n} then, if we take the
plane in canonical position w.r.t. X
={x_{1},¼,x_{n}} we have,
y_{i}( < w,x_{i} > + b ) ³ 1 for all i £ n . 

There could be many such planes but it is geometrically obvious that
the one farthest from the points should be prefered over all the
others. The intuition behind this is the fact that the farther the
separating boundary is from the observations the more likely it seems
for future data to end up being correctly classified by this plane. In
other words, we expect better generalization power for boundaries with
larger margin, i.e., for planes with small w (recall that r = 1/w. This intuition is confirmed by the following theorem.
 Theorem
 Consider hyperplanes through the origin in canonical position
w.r.t. X
={x_{1},¼,x_{n}}. Then, the set of linear classifiers,
g_{w}(x) = sgn < w,x > with w £ L has VC dimension,
V £ 
min
 { R^{2}L^{2}, R^{d}L^{d}} 

where R is the radius of the smallest sphere around the origin containing
X
Before proving it notice that in fact the length of w controls the VC
dimension so that the larger the margin the larger the generalization
power as expected.
Proof:
We need to show both, V £ R^{d}L^{d} and V £ R^{2}L^{2}.
The first inequality follows from the fact that the maximum number
of spheres of radius 1/L that still fit inside a sphere of radius R
is at most vol(R)/vol(1/L) = (RL)^{d}, where
vol(r) = C_{d}r^{d} is the volume of the sphere of radius r in R^{d}.
More than this number of points is imposible to shatter with margin of
at least 1/L. Thus, V £ (RL)^{d}. For the other inequality
again we show that the number of points that can be shattered with margin 1/L
is at most (RL)^{2}. If n points can be shattered then for all possible
choices of y_{i} Î {1,1} there is an hyperplane with parameter w with
w £ L, in canonical position w.r.t. {x_{1},¼,x_{n}} separating
+1's from 1's, i.e., satisfying,
y_{i} < w,x_{i} > ³ 1 for all i=1,¼,n. 

But this together with CauchySchwartz inequality and the fact that w £ L
imply,
 

 < w, 
n å
i=1

y_{i}x_{i} >  £ w  
n å
i=1

y_{i}x_{i} 
 
 

 

To bound the sum consider the case when the labels y_{i} are Rademacher variables, i.e.
iid with P{y_{i}=1}=1P{y_{i} = 1} = 1/2. From the fact that E{y_{i}y_{j}}=0
when i ¹ j and that y_{i}^{2}=1 for all i £ n, we obtain
 


n å
i=1

E{ < y_{i}x_{i}, 
å
 y_{j}x_{j} > } 
 
 


n å
i=1


ì í
î

å
j ¹ i

E[ < y_{i}x_{i},y_{j}x_{j} > ] + E[ < y_{i}x_{i},y_{i}x_{i} > ] 
ü ý
þ


 
 


n å
i=1

x_{i}^{2} £ n R^{2}. 
 

If the bound is true for the expectation when Rademacher variables are used, then there
must exist y_{i}'s for which,
 
å
 y_{i}x_{i}^{2} £ n R^{2}. 

Squaring the initial inequality and using the above bound, we obtain
and the result follows after deviding through by n.·
File translated from
T_{E}X
by
T_{T}H,
version 3.63. On 12 Oct 2004, 15:22.
