How Bayes’ Theorem is applied in Machine Learning