In
statistical classification
In statistics, classification is the problem of identifying which of a set of categories (sub-populations) an observation (or observations) belongs to. Examples are assigning a given email to the "spam" or "non-spam" class, and assigning a diagno ...
, the Bayes classifier minimizes the
probability
Probability is the branch of mathematics concerning numerical descriptions of how likely an Event (probability theory), event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and ...
of misclassification.
Definition
Suppose a pair
takes values in
, where
is the class label of
. Assume that the
conditional distribution
In probability theory and statistics, given two jointly distributed random variables X and Y, the conditional probability distribution of Y given X is the probability distribution of Y when X is known to be a particular value; in some cases the co ...
of ''X'', given that the label ''Y'' takes the value ''r'' is given by
:
for
where "
" means "is distributed as", and where
denotes a probability distribution.
A
classifier is a rule that assigns to an observation ''X''=''x'' a guess or estimate of what the unobserved label ''Y''=''r'' actually was. In theoretical terms, a classifier is a measurable function
, with the interpretation that ''C'' classifies the point ''x'' to the class ''C''(''x''). The probability of misclassification, or
risk
In simple terms, risk is the possibility of something bad happening. Risk involves uncertainty about the effects/implications of an activity with respect to something that humans value (such as health, well-being, wealth, property or the environme ...
, of a classifier ''C'' is defined as
:
The Bayes classifier is
:
In practice, as in most of statistics, the difficulties and subtleties are associated with modeling the probability distributions effectively—in this case,
. The Bayes classifier is a useful benchmark in
statistical classification
In statistics, classification is the problem of identifying which of a set of categories (sub-populations) an observation (or observations) belongs to. Examples are assigning a given email to the "spam" or "non-spam" class, and assigning a diagno ...
.
The excess risk of a general classifier
(possibly depending on some training data) is defined as
Thus this non-negative quantity is important for assessing the performance of different classification techniques. A classifier is said to be
consistent
In classical deductive logic, a consistent theory is one that does not lead to a logical contradiction. The lack of contradiction can be defined in either semantic or syntactic terms. The semantic definition states that a theory is consistent i ...
if the excess risk converges to zero as the size of the training data set tends to infinity.
Considering the components
of
to be mutually independent, we get the
naive bayes classifier
In statistics, naive Bayes classifiers are a family of simple "probabilistic classifiers" based on applying Bayes' theorem with strong (naive) independence assumptions between the features (see Bayes classifier). They are among the simplest Baye ...
, where
Proof of Optimality
Proof that the Bayes classifier is optimal and
Bayes error rate In statistical classification, Bayes error rate is the lowest possible error rate for any classifier of a random outcome (into, for example, one of two categories) and is analogous to the irreducible error.K. Tumer, K. (1996) "Estimating the Bayes e ...
is minimal proceeds as follows.
Define the variables: Risk
, Bayes risk
, all possible classes to which the points can be classified
. Let the posterior probability of a point belonging to class 1 be
. Define the classifier
as
Then we have the following results:
(a)
, i.e.
is a Bayes classifier,
(b) For any classifier
, the ''excess risk'' satisfies