将多元高斯分布拟合到给定的数据集 [英] Fit multivariate gaussian distribution to a given dataset

查看:454
本文介绍了将多元高斯分布拟合到给定的数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要拟合多元高斯分布,即对于给定的python中的音频特征数据集,获取最近的多元高斯的均值向量和协方差矩阵.音频特征(MFCC系数)是一个N X 13矩阵,其中N约为4K.有人可以在python中为这些数据概述适合高斯的软件包和技术吗?

解决方案

使用numpy软件包. numpy.mean 解决方案

Use the numpy package. numpy.mean and numpy.cov will give you the Gaussian parameter estimates. Assuming that you have 13 attributes and N is the number of observations, you will need to set rowvar=0 when calling numpy.cov for your N x 13 matrix (or pass the transpose of your matrix as the function argument).

If your data are in numpy array data:

mean = np.mean(data, axis=0)
cov = np.cov(data, rowvar=0)

这篇关于将多元高斯分布拟合到给定的数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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