Bayesian and machine learning methods with applications in asset pricing