In the generalized linear model, the distribution of a random variable $Y$ is assumed to be an exponential family distribution, and it is written in terms of an explanatory variable $X$ and parameter $\theta$. I was wondering if $X$ is viewed as a parameter of the distribution of $Y$, or a random variable and the distribution of $Y$ mentioned earlier is in fact a conditional one given $X$?
If $X$ can be viewed as a random variable, there seems to me a problem here. In the generalized linear model, the distribution of a random variable $Y$ is assumed to be an exponential family distribution. But since the distribution of $Y$ depends on $X$, it is actually that $P(Y|X=x)$ is an exponential family distribution. $X$ can have any distribution, and the unconditional distribution of $Y$ may not be an exponential family distribution. So how shall we understand the problem?
Thanks!