In machine learning (ML), a margin classifier is a type of classification model which is able to give an associated distance from the decision boundary for each data sample. For instance, if a linear classifier is used, the distance (typically Euclidean, though others may be used) of a sample from the separating hyperplane is the margin of that sample.
The notion of margins is important in several ML classification algorithms, as it can be used to bound the generalization error of these classifiers. These bounds are frequently shown using the VC dimension. The generalization error bound in boosting algorithms and support vector machines is particularly prominent.
The margin for an iterative boosting algorithm given a dataset with two classes can be defined as follows: the classifier is given a sample pair
(x,y)
x\inX
y\inY=\{-1,+1\}
hj\inC
j
C
\alphaj\inR
t
x
| |||||||||
\sum|\alphaj| |
.
By this definition, the margin is positive if the sample is labeled correctly, or negative if the sample is labeled incorrectly.
This definition may be modified and is not the only way to define the margin for boosting algorithms. However, there are reasons why this definition may be appealing.[1]
Many classifiers can give an associated margin for each sample. However, only some classifiers utilize information of the margin while learning from a dataset.
Many boosting algorithms rely on the notion of a margin to assign weight to samples. If a convex loss is utilized (as in AdaBoost or LogitBoost, for instance) then a sample with a higher margin will receive less (or equal) weight than a sample with a lower margin. This leads the boosting algorithm to focus weight on low-margin samples. In non-convex algorithms (e.g., BrownBoost), the margin still dictates the weighting of a sample, though the weighting is non-monotone with respect to the margin.
One theoretical motivation behind margin classifiers is that their generalization error may be bound by the algorithm parameters and a margin term. An example of such a bound is for the AdaBoost algorithm.[1] Let
S
m
D
d
m\geqd\geq1
1-\delta
PD\left(
| |||||||||
\sum|\alphaj| |
\leq0\right)\leq
P | ||||||||||||
|
\leq\theta\right)+O\left(
1 | |
\sqrt{m |
for all
\theta>0