Consider a set of $m$ examples $X=\{x^{(1)},x^{(2)},\cdots, x^{(m)}\}$ drawn independently from the true but unknown data-generating distribution $p_{\text{data}}(x)$.
Let $p_{\text{model}}$ be a parametric family of probability distributions over the same space indexed by $\theta$.
The likelihood function is defined as $L(\theta|X) =p_{\text{model}}(x^{(1)}, x^{(2)},\cdots,x^{(m)};\theta)$.
Because of the independence assumption, we can write $L(\theta|X)=\prod_{i=1}^m p_{\text{model}}(x^{(i)};\theta)$
Now, suppose we are $m$ examples $\{(x^{(1)},y^{(1)}),(x^{(2)},y^{(2)}),\cdots, (x^{(m)},y^{(m)})\}$ and we are want to estimate the conditional probability $P(y|x;\theta)$ using the conditional maximum likelihood estimation, so that we can predict $y$ given $x$ .
How do I define the conditional likelihood? The problem I'am facing is that we cannot write $L(\theta; y|x)=P(Y|X;\theta)$ since $X$ contains different $x^{(i)}$s. But I think it makes sense to 'define' $L(\theta;y|x)=\prod_{i=1}^mP(y^{(i)}|x^{(i)};\theta)$ although in unconditional likelihood this followed from the definition of likelihood and the independence assumption. But I don't think I am comfortable with this. How does one define conditional likelihood?