Derivation of $p(\omega|X,Y) = \frac{p(Y|X, \omega) p(\omega)}{p(Y|X)}$ in bayesian modelling I am reading this thesis on Bayesian modelling explanation and there is a statement (section 2.1) there which I can't understand:

Here we have a regression problem, where $X$ are our inputs, $Y$ are outputs and $\omega$ are model parameters.
Why we have $p(\omega)$ instead of $p(\omega | X$)? If we apply Bayes rule to $p(\omega|X,Y)$ we get:
$$p(\omega|X,Y) = \frac{p(Y|X, \omega) p(\omega | X)}{p(Y|X)}$$
The only way to get the statement from the paper is to assume either $p(\omega | X) = p(\omega)$ or $p(X,Y) = p(Y|X)$, both of which feels wrong to me.
 A: If you read carefully the relevant section of the thesis of Yarin Gal, you will see that $\omega$ is a parameter that indexes the conditional distribution of $Y$ conditional on the covariates X. As for instance in the regression model $Y=X\omega_+\epsilon$. There is thus little reason for $\omega$ to depend on $X$. (Although Zellner's G-prior is a counterexample to this statement.)
A: I think 
$$P(w|X,Y)=\dfrac{P(X,Y|w)P(w)}{P(X,Y)}=\dfrac{P(Y|X,w)P(X|w)P(w)}{P(Y|X)P(X)}$$
I also think $X$ and $w$ are independent, so $$P(X)P(w)=P(X,w)=P(X|w)P(w) \iff P(X)=P(X|w)$$
And therefore  
$$P(w|X,Y) = \dfrac{P(Y|X,w)P(w)}{P(Y|X)}$$
Why are $X$ and $w$ independent?  What form we expect $w$ to take $a\ priori$ is completely independent of the observed $X$.  Of course, the actual $w$ that we choose will depend on $X$, but without knowing anything about the data $w$ is independent of $X$.
A: Your question is on the proper derivation of \begin{equation}
p(\omega|X,Y)=\frac{p(Y|X,\omega)p(\omega)}{p(Y|X)}
\end{equation}
Let me give you some intuition.  $\omega$ is the set of parameters that link $x\in{\mathbf{X}}$ to $y\in\mathbf{Y}$.  It does not depend upon the distribution of either $X$ or $Y$.
The $$p(Y|X,\omega)p(\omega)$$ could be written out as $$p(Y|X,\omega)p(X,\omega).$$  Because they are independent, $$p(X,\omega)=p(X)p(\omega).$$  There is no uncertainty regarding data in a Bayesian context so $p(X)=1$.  This leaves you with the prior probability of $\omega.$  For the denominator, because $\omega$ is marginalized out, you are left with $p(Y|X)$ because $$p(Y|X)=\int_{\omega\in\Omega}p(Y|X,\omega)p(\omega)\mathrm{d}\omega.$$
If you want to be really technical, you could make $p(X)=k,k\in(0,1]$ because it is independent of the rest of the denominator and would pass outside the integral and vanish through canceling for all values $\omega\in\Omega$.
