defined as pn exact match ratio = {yi yi the exact match ratio is rather stringentas it requires full match in order to consider partial correctnessthe following metrics could be used instead the accuracy is defined as the ratio of correctly predicted labels and the total number of predicted and actual labels the formula is given by pn accuracy pi= = bi|yi bi|yi the precision is defined as the ratio of correctly predicted labels and the total number of predicted labels specificallypn precision = |yi yi pn = ( the recall is defined as the ratio of correctly predicted labels and the total number of actual labels specificallypn bi|yi pn recall = = |yi ( the hamming loss counts the average number of incorrect predictions for all classescalculated as - xx { yi { { yi hamming { = = classification via bayesrule we saw from theorem that the optimal classifier for classes divides the feature space into regionsdepending on ( )the conditional pdf of the response given the feature vector in particularif ( xf ( xfor all ythe feature vector is classified as classifying feature vectors on the basis of their conditional class probabilities is natural thing to doespecially in bayesian learning contextsee section for an overview of bayesian terminology and usage specificallythe conditional probability ( xis interpreted as posterior probabilityof the form ( xf ( yf ( )( where ( yis the likelihood of obtaining feature vector from class and (yis the prior probability of class by making various modeling assumptions about the prior here we have used the bayesian notation convention of "overloadingthe notation