Python中的多元正态性测试 [英] Multivariate normality test in Python

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

问题描述

是否有任何 Python 包中的多变量正态性测试可用?

Is there a multivariate normality test available in any of packages in Python?

我听说过一些 scipy 函数,但它们适用于多元数据吗?我有一个包含 30000 个数据点的数据集,每个点有 1024 个变量.我想检查这些变量是否具有多元正态分布.我如何在 Python 中做到这一点.

I have heard of some scipy functions but are they applicable to multivariate data? I have a dataset with 30000 datapoints each point with 1024 variables. I want to check if these variables have multivariate normal distribution. How do I do this in Python.

推荐答案

使用 scipy,您可以从多元正态分布创建随机变量样本.请参阅此处.

Using scipy you can create samples of random variable from multivariate normal distribution. See here.

如果您已经有一个使用多元正态分布生成的样本,但您不知道其参数,则可以使用 最大似然估计器来估计它们(参见此示例).

If you already have a sample that was generated using multivariate normal distribution, but you don't know its parameters, you can use maximum likelihood estimator to estimate them (see this example).

如果您有一个样本并且想要测试它是否是使用多元正态分布生成的,您可以使用 拟合优度检验.有关相关 scipy 方法,请参阅此讨论.

If you have a sample and you want to test if it was generated using multivariate normal distribution, you can use goodness of fit test. See this discussion for relevant scipy methods.

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

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