Bayes optimal classifier in machine learning