bayes with model