I've been reviewing Bayesian model selection, where probability of data given the model is defined with the following equation: $$p(y|M_k) = \int p(y|\theta)p(\theta|M_k)d\theta$$ As I understand, $p(y|\theta)$ is simply the distribution of y under the parameters we've already defined. I'm a bit of confused by the term $p(\theta|M_k)$. I know that we can rewrite it with the Bayes rule: $$p(\theta|M_k) = p(\theta)p(M_k|\theta)$$ I suppose that we can find the value of $p(\theta)$ using the Beta probability distribution. But what is happening with $p(M_k|\theta)$? How do we estimate the probability of the model given the parameters? It feels like we should estimate the probability of the probability distribution given its parameters, so maybe it is a Dirichlet distribution problem?
I don't know what to do with this $p(M_k|\theta)$ term, will be very grateful if you can explain it to me.