Python中的多元正态密度? [英] Multivariate normal density in Python?

查看:47
本文介绍了Python中的多元正态密度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何 python 包允许有效计算 多元变量的 PDF(概率密度函数)正态分布?

Is there any python package that allows the efficient computation of the PDF (probability density function) of a multivariate normal distribution?

它似乎没有包含在 Numpy/Scipy 中,而且令人惊讶的是 Google 搜索没有发现任何有用的东西.

It doesn't seem to be included in Numpy/Scipy, and surprisingly a Google search didn't turn up any useful thing.

推荐答案

多变量法线现在在 SciPy 0.14.0.dev-16fc0af 上可用:

The multivariate normal is now available on SciPy 0.14.0.dev-16fc0af:

from scipy.stats import multivariate_normal
var = multivariate_normal(mean=[0,0], cov=[[1,0],[0,1]])
var.pdf([1,0])

这篇关于Python中的多元正态密度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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