The Bayes Classifier is a binary classification algorithm. It is often introduced as one of the first algorithms to master in the field of machine learning. Bayes classifier is called Generative since it is trained to learn the distribution of both marginal classes, instead of the decision frontier itself.

In each article, I try to summarize the key idea of each algorithm in just a few lines.

## Key ideas

- Generative Model that tries to estimate and
- Used for binary classification
- Relies on knowing and can therefore never be acheived
- Similar to knowing the decision frontier itself

## Bayes Classifier

In binary classification, we’ll try to predict labels : is either or . The datas we use is a matrix of observations with features.

Let be the *prior* probability.

Our aim is to define a classification function , i.e such that : and .

These two constraints can be combined in a single constraint :

is called the **Bayes Classifier**.

The Bayes classifier can never be reached since it would imply knowing the decision frontier before the classification process. Bayes classifier is the optimal classifier!

## Theory behind Bayes

Bayes classifier uses the so-called Bayes Rule whose fundamental result states that for two given event and :

Bayes classifier is a Generative model in the sense that we estimate the decision frontier using the marginal distributions .

Graphically, the distributions of and are represented by the two ellipses, and the decision boundary is the black line.

## Plug-in principle

In most of the other classifiers we’ll cover, we are going to use the plug-in principle. The idea is to estimate the desicion boundary by , and then plug-in this estimator into the classifier, such that :

Conclusion: In the next articles, we’ll cover the most common classifiers in supervised learning theory. Don’t hesitate to drop a comment if you have any question.

Like it? Buy me a coffee

## Leave a comment