The Bayes decision rule chooses an action, meaning one of the decisions available to a decision maker, that minimizes the expected
value of a loss function with respect to the
posterior distribution. If is an action,
is the unknown state,
is the loss, and
is the posterior
distribution after observing
, the Bayes action minimizes the posterior
risk
For classification with the zero-one loss function, which assigns loss 0 to a correct result and loss 1 to an incorrect result, the rule chooses the class having the largest probability under the posterior distribution.