有没有一种方法可以从多元内核估计中的概率密度中获取概率?
我有一个关于matlab中多元核密度的问题,这是我第一次使用它。
我有一个 3 维样本数据(轴上的 x、y、z),想要使用核密度估计找到处于特定体积中的概率。因此,我使用了matlab中的mvks密度函数,并得到了我决定的点的概率密度(估计函数值)。
我最初想做的是(如果我可以对函数进行精细化)对给定体积的多元函数进行三重积分。但mvks密度函数仅返回密度估计值,不返回函数。我认为会有一种简单的方法来计算密度的概率,但我被困住了。有人对此有任何有用的信息吗?提前致谢。
我考虑过使用 fitdist 函数来查找分布,但它仅适用于单变量内核分布。
我还尝试使用 mvncdf,这是一个在设置均值和标准差后返回样本数据行的多元正态分布的 cdf 的函数。但随后我必须计算每个数据点中每个正态分布的给定体积的概率,然后将其相加,这对于大量数据来说效率很低,而且我不知道这是否是正确的方法。
I have a question about multivariate kernel density in matlab, which is my first time using it.
I have a 3-dimensional sample data (x, y, z in axes) and want to find a probability of being in a certain volume using kernel density estimation. So, I used the mvksdensity function in matlab and got the probability density (estimated function values) for the points I decided.
What I originally wanted to do was to (if I could fine the function) triple integral the multivariate function for a given volume. But the mvksdensity function only returns the density estimates and does not return the function. I thought there will be an easy way to compute the probability from the density, but I’m stuck. Does anyone have any useful information for this? Thanks in advance.
I thought about fitdist function to find the distribution, but it only works for univariate kernel distribution.
I also tried to use mvncdf, which is a function that returns the cdf of the multivariate normal distribution for the row of the sample data after setting the mean and the std. But then I have to calculate the probability for a given volume for every normal distribution in each data point and then add it, which will be inefficient for a large amount of data and I don't know if it's a correct way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以建议以下蒙特卡罗方法。您找到一个包含估计概率密度的整个质量的主体积。为了提高效率,该值应尽可能小。然后,您可以在主体积中生成大量测试点,可以在网格上生成,也可以根据均匀分布随机生成。特定体积V的概率内容可以通过V中测试点的密度值之和除以所有测试点的密度值之和来估计。然而,我担心在 3D 中您至少需要 1E6 个测试点,甚至可能更多。如果您允许我访问您的样本,我将很高兴尝试我的建议。计算出 V 的估计概率内容的标准误差估计值也应该相当容易。
I can suggest the following Monte-Carlo approach. You find a master volume that contains the entire mass of the estimated probability density. This should be as small as possible for the sake of efficiency. Then you generate a large number of test points in the master volume, either on a grid or randomly according to a uniform distribution. The probability content of a specific volume V can be estimated by the sum of the density values of the test points in V over the sum of the density values of all test points. I am afraid, however, that in 3D you would need at least 1E6 test points, probably more. If you give me access to your sample, I would be pleased to try out my suggestion. It should also be fairly easy to work out an estimate of the standard error of the estimated probability content of V.