Consider the data X and the label Y .
We want to "optimize" :
The Bayes estimator consists in minimizing a Bayes risk defined by :
where R(Y, Y') is a cost function.
The cost function of the Marginal A Posteriori Modes estimator is given by :
This estimator minimize the number of misclassified pixels.
The solution which minimize the Bayes risk is given by :
It is obtained using a sampling algorithm ( Metropolis , Gibbs Sampler , ...)