Role of Bayes decision rule in machine learning