# Does a classifier based on optimal bayes classifier equation classify every new instance the same way?

I'm trying to understand how optimal bayes classifier works and I was wondering if, given that the function we try to maximize when making a new prediction does not depend on the instance we are trying to classify, is it correct to state that the optimal bayes classifier would always predict the most probable class no matter what the input is?

EDIT:

I've been studying the subject on "Machine Learning, Tom Mitchell, McGraw Hill, 1997" where is stated that the prediction for a new instance is the class $$v_j$$ for which the function $$\underset{v_j \in V}{\operatorname{arg max}}\sum_{h_i \in H}{P}(v_j|h_i){P}(h_i|D)$$
Where $$V$$ is the set of all possible classes, $$H$$ is the space of the hypothesis and $$D$$ is the train dataset.

• Hi Niccolò, welcome to DS stack exchange. Please include a reference for your statement, this would help clear the particular misunderstanding that it seems you're having. Anyway, the statement is wrong. The output does depend on the input. May 16 at 10:00
• @KishKash thank you for the suggestion, I don't know if I'm misinterpreting the way the classification happens but to me it seems like all the values involved in the maximization problem depends on dataset, hypotesis space and class space May 16 at 10:24

Therefore, the $$\arg \max$$ in the optimization problem above is over different functions mapping inputs to outputs, taking into account the entire training set.
• The books says that the sum in the argmax I wrote gives the probability ${P}(v_j|D)$ and that the optimal classification is the $v_j$ value which is a class value itself. So I don't agree with the fact that the problem is trying to obtain the best classification function. The book also differentiate the bayes optimal classifier from the MAP problem which is the one that gives the optimal hypotheses as output. May 16 at 20:09