如何从概率对象(fitdist)获取新数据点的概率? [英] How to get probability of new data point from probability object (fitdist)?

查看:134
本文介绍了如何从概率对象(fitdist)获取新数据点的概率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Matlab fitdist 通过以下方式起作用:

I have fitted several probability distribution to my dataset by using the Matlab fitdist function in the following way:

pd = fitdist(myDataset,distname)

通过此函数,我得到了概率分布对象pd.现在,我可以计算mean(pd)std(pd)median(pd)等.

From this function I got a probability distribution object pd. I now that I can calculate mean(pd), std(pd), median(pd) etc.

但是如何根据拟合的分布来计算新数据点的概率呢?

But how can I calculate the probability of a new data point according to the fitted distribution?

推荐答案

借助pdf()函数,您可以评估概率值.
首先,您可以像实际一样使用fitdist()函数创建概率分布对象.

You can evaluate the probability value thanks to the pdf() function.
First of all you can create your probability distribution object thanks to the fitdist() function, as you already did actually.

pd = fitdist(myDataset,distname);

现在,要收集点myPoint的概率值,可以按以下方式使用pdf():

Now, to gather the probability value for a point myPoint you can use pdf() as follows:

myProb=pdf(pd,myPoint);

其中,pdfitdist()的输出,myPoint可以是单个点,也可以是点的向量.因此,由于myProb中的每个值都对应于myPoint中的值,因此myProb将是单个点或一个或多个点(分别).

where pd is the output from fitdist() and myPoint can either be a single point or a vector of points. Consequently, myProb will be a single point or a vector or points (respectively) since each value in myProb corresponds to a value in myPoint.

这篇关于如何从概率对象(fitdist)获取新数据点的概率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆