Conditional Probability vs Joint Probability

62 Views Asked by At

I have a model that predicts the color of clothing items (red, blue, green, etc). I have another model that predicts the category of the item (shirt, pants, dress, hat, etc). Given an image, if I run the category prediction model and know that it's a pant, and then run the color prediction model to know it's red in color, what does that probability signify?

Does the score coming out from the color prediction model mean P(color=red | category=pant) or does that mean P(color=red, category=pant)? Or is it just P(color=red)?

What happens when I run the color prediction model only on those images where the category prediction model predicted a pant? Will the color score mean P(color=red | category=pant) in that case?

1

There are 1 best solutions below

2
On BEST ANSWER

What the prediction means depends completely on the model and how you use it.

You could have a prediction based on the type of garment. Or they could be independently trained, in which case you might want to multiply the probabilities to approximate $P(pants, red)$, but that implies you are assuming that garment type and garment color are independent variables, an assumption I personally would not want to make.

If you want to get the conditional or joint probability, you'll need to set up your model and algorithm in such a way that this is what you get.