I have a problem on calculating the likelihood of observing a data point x given the predicted lable. My application is on text classification where I have to detect Spam and No Spam documents.
I use a Logistic Regression classifier that gives me the $P(Y=Spam|X=document)$.
Now I want to calculate:
$P(X=x|Y=Spam)$. The probability that I have a document $x$ given that the label is Spam.
This is simplified as follows: $\frac{P(Y=Spam|X=x)*P(X=x)}{P(Y=Spam)}$.
The $P(X=x)$ is known from dataset. The $P(Y=Spam)$ is also know from the dataset as prior.
Is this approach correct for calculating the Likelihood?