简体   繁体   English

如何使用MATLAB解决此条件概率问题?

[英]How do I solve this conditional probabilities problem with MATLAB?

If P( c j | x i ) are already known, where i=1,2,...n; 如果已知P(c j | x i ),i = 1,2,... n; j=1,2,...k; J = 1,2,...,K;

How do I calculate/estimate: P( c j | x l , x m , x n ) , where j=1,2,...k; 如何计算/估算: P(c j | x l ,x m ,x n ,其中j = 1,2,... k; l,m,n belongs to http://latex.mathoverflow.net/jsMath/fonts/cmsy10/alpha/120/char32.png {1,2,...n} ? l,m,n 属于http://latex.mathoverflow.net/jsMath/fonts/cmsy10/alpha/120/char32.png {1,2,... n}吗?

EDIT2 (following the OP's comment) EDIT2 (在OP的评论之后)

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 ). 根据贝叶斯规则,我们知道P(C|x1,x2,x3) ~ P(C)*P(x1,x2,x3|C) ,因此对于分类,您可以针对所有C=j计算该表达式并预测最大可能的类别( MAP )。

Now to compute P(x1,x2,x3|C) , for iid 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. 现在要计算P(x1,x2,x3|C) ,对于iid观测值,可以写成: P(x1,x2,x3|C) = P(x1|C)*P(x2|C)*P(x3|C) ,每个参数模型都可以轻松计算。

Maybe this site can help? 也许这个网站可以帮助您? I'm assuming your trying to implement the Bayes rule in Matlab. 我假设您尝试在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). 条件概率P(A | B,C)并非(完全/完全:)由P(A | B)和P(A | C)确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM