Bayes theorem in machine learning full guide to inference python