[英]multivariate gaussian probability density function python on Mac
I'm unable to use SciPy and its modules for calculating the probability density function of a multivariate Gaussian distribution.我无法使用 SciPy 及其模块来计算多元高斯分布的概率密度函数。 I know that such modules exist, but I'm unable to use them (I can't even import scipy: I get the message:
ImportError: No module named scipy
).我知道存在这样的模块,但我无法使用它们(我什至无法导入 scipy:我收到消息:
ImportError: No module named scipy
)。
I was wondering if there were any good tool or other way to calculate the pdf of a multivariate Gaussian distribution in python.我想知道是否有任何好的工具或其他方法可以在 python 中计算多元高斯分布的 pdf。 Thanks in advance for the help!
在此先感谢您的帮助!
It is provided by scipy.stats.multivariate_normal.pdf()
: http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.stats.multivariate_normal.html .它由
scipy.stats.multivariate_normal.pdf()
: http : scipy.stats.multivariate_normal.pdf()
。 You will need to specify the mean
and variance-covariance matrix
.您需要指定
mean
和variance-covariance matrix
。
Before that you need to install scipy
if you have not done so.在此之前,如果您还没有安装
scipy
则需要安装scipy
。 You can either download a .dmg
installation package.您可以下载
.dmg
安装包。 Or try an 'distribution' such as Anaconda Python
.或者尝试“发行版”,例如
Anaconda Python
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.