An Introduction to Bayesian Networks and their Contemporary Applications