Let's say we have a classifier, which we trained on some balanced data, and during the inference our data is imbalanced. Is there a way to leverage the information about the distribution of the imbalanced data during the prediction?
To be more precise we have the following components:
$P(C|X,B)$ - model; $P(C|B)=\frac{1}{|C|}$; $P(C)$ - dist. of classes, where
$C$ - classes; $X$ - features; $B$ - data is balnaced
What we are looking for is the distribution $P(C|X)$.
I was trying to juggle the chain rule and the Bayes theorem to obtain $P(C|X)$ from the three components above somehow, but I failed.
So the question is: Is it possible to express $P(C|X)$ in terms of $P(C|X,B)$, $P(C|B)$ and $P(C)$? If it is not straightforward, what additionally we would need to have to be able to calculate $P(C|X)$?