I'm following Bayesian Methods for Machine Learning course on Coursera and the following equations are given for training and prediction without derivation:
Training:
$$ P(\theta | X_{tr}, y_{tr}) = \frac{P(y_{tr} | X_{tr}, \theta), P(\theta)}{P(y_{tr} | X_{tr})}$$
and Prediction:
$$ P(y_{ts} | X_{ts}, X_{tr}, y_{tr}) = \int P(y_{ts} | X_{ts}, \theta) P(\theta | X_{tr}, y_{tr}) d \theta $$
where $ts$ refers to test data, and $tr$ to training.
I was able to derive the expression for training but I'm stuck on the prediction equation
References
Bayesian Methods for Machine Learning, Coursera, Week 1, "Bayesian approach to statistics".
Thanks for your time