[英]Gaussian Mixture Model 1D data
I have modeled my 1D data (1000*1 matrix) into 3 Gaussians, using 我已经使用以下方法将我的一维数据(1000 * 1矩阵)建模为3个高斯模型
gmdistribution.fit(X,3)
How can I plot something Like this? 我如何绘制这样的东西?
It shows the probability of a given point belonging to each class. 它显示了给定点属于每个类别的概率。
Write a function plotGaussian
, which takes the mean, the variance, and a range of values. 编写一个函数
plotGaussian
,该函数获取均值,方差和值的范围。 The function should generate the points to plot, and call the plot
function. 该函数应生成要绘制的点,然后调用
plot
函数。 Then do hold on
, and call plotGaussian
3 times. 然后
hold on
,并调用plotGaussian
3次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.