Bayes Optimal Classifier Integral Formula

218 Views Asked by At

I'm trying to deduce the integral formula of the total error for the Bayes Optimal Classifier, in the case we have only two classes.

In the example i'm considering, after i've applied the bayes rule i got that the classification's border is at 4. As you can see in the picture.enter image description here

The error of each classification is alread written in the picture. What i've tried to deduce is the total error, and to me :

$\varepsilon = P(\omega _{1}|X)\epsilon _{2}+P(\omega _{2}|X)\epsilon _{1}$

where X is the feature vector and $\omega _{1}$,$\omega _{2}$ are the 2 classes.

However, standing to my prof's slides, the correct formula is :

enter image description here

But i dont understand why :S