How do I solve this conditional probabilities problem with MATLAB?
If P( cj | xi ) are already known, where i=1,2,...n; j=1,2,...k;
How do I calculate/estimate: P( cj | xl , xm , xn 开发者_如何学运维), where j=1,2,...k; l,m,n belongs to http://latex.mathoverflow.net/jsMath/fonts/cmsy10/alpha/120/char32.png {1,2,...n} ?
EDIT2 (following the OP's comment)
From bayes rule we know that P(C|x1,x2,x3) ~ P(C)*P(x1,x2,x3|C)
and therefore for classification, you compute that expression for all C=j
and predict the most likely class (MAP).
Now to compute P(x1,x2,x3|C)
, for i.i.d observations, this can be written as: P(x1,x2,x3|C) = P(x1|C)*P(x2|C)*P(x3|C)
, which given a parametric model each could be computed easily.
Maybe this site can help? I'm assuming your trying to implement the Bayes rule in Matlab.
What you want to do is not possible without further information or simplifying assumptions.
The conditional probability P(A|B,C) is not (completely/at all :) determined by P(A|B) and P(A|C).
精彩评论