用高斯混合模型拟合高斯函数

2024-05-18 23:43:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我有这个data

我使用matplotlib绘制直方图:

n, bins, _= plt.hist(data, bins = 1000)
plt.show()

结果是:Histogram of the dataset

我们可以注意到三个甚至四个高斯分布。为了使高斯分布符合柱状图,我遵循了example

^{pr2}$

然而,结果是: Result of the Gaussian mixture model

有人能帮我理解为什么这么糟糕吗?在


Tags: datamatplotlibexampleshow绘制plt直方图hist

热门问题