美文网首页
从0实现高斯混合模型(EM-GMM)

从0实现高斯混合模型(EM-GMM)

作者: Yanring_ | 来源:发表于2018-12-15 17:16 被阅读0次

Problem:

  1. Please build a Gaussian mixture model (GMM) to model the data in file TrainingData_GMM.csv. Note that the data is composed of 4 clusters, and the model should be trained by expectation maximization (EM) algorithm.

  2. Based on the GMM learned above, assign each training data point into one of 4 different clusters

Questions:

1) Show how the log-likelihood evolves as the training proceeds


image

x轴为迭代次数,y轴为log-likelihood值

2) The learned mathematical expression for the GMM model after training on the given dataset

\alpha=\begin{bmatrix}0.23048224536932024\\0.22999999854996792\\0.272826418924052\\0.2666913371566595\end{bmatrix}

\mu = \begin{bmatrix}-0.40658&0.32248\\ 1.20354&-1.19686\\ 0.14435&0.14614\\ -0.44149&-0.45088\\\end{bmatrix}

\sigma = \begin{bmatrix} \begin{bmatrix}0.03446&-0.01299\\ -0.01299&0.03458\\\end{bmatrix} \begin{bmatrix}0.02259&-0.00761\\ -0.00761&0.02361\\\end{bmatrix} \begin{bmatrix}0.00886&0.00187\\ 0.00187&0.00881\\\end{bmatrix} \begin{bmatrix}0.07024&0.03731\\ 0.03731&0.06498\\\end{bmatrix} \end{bmatrix}
3) Randomly select 500 data points from the given dataset and plot them on a 2dimensional coordinate system. Mark the data points coming from the same cluster (using the results of Problem 2) with the same color.

image
4) Some analyses on the impacts of initialization on the converged values of EM algorithm
不同的初始参数对EM-GMM算法最后收敛的效果影响非常大,我的 image
node_num = 500
_,gamma=E()
label = np.argmax(gamma,1)
selected_node_index = np.random.choice(range(n),size=node_num)
node_pos = data[selected_node_index]
label = label[selected_node_index]
pylab.scatter(node_pos[:,0],node_pos[:,1],marker='o',c=label,cmap=pylab.cm.Accent)
<matplotlib.collections.PathCollection at 0x1212d0b00>
image

相关文章

  • 从0实现高斯混合模型(EM-GMM)

    Problem: Please build a Gaussian mixture model (GMM) to m...

  • 机器学习系列-EM算法

    引子 三硬币模型 EM算法 三硬币模型的算法实现 高斯混合模型 总结

  • EM算法和混合高斯模型(二)

    高斯混合模型 顾名思义,高斯混合模型是指某一群体中含有多个高斯分布,具有如下形式的概率分布模型: 高斯混合模型参数...

  • 隐马尔可夫模型|机器学习推导系列(十七)

    一、概述 1. 介绍 动态模型可以类比高斯混合模型这种静态模型,高斯混合模型的特点是“混合”,动态模型的特点是在“...

  • 高斯混合模型

    高斯混合模型(Gaussian Mixture Model)高斯混合模型,通常简称GMM,是一种广泛使用的聚类算法...

  • EM算法在高斯混合模型的应用

    定义 EM算法的一个重要应用是高斯混合模型的参数估计,高斯混合模型的应用广泛,在许多情况下,EM算法是学习高斯混合...

  • GATK的VQSR介绍

    高斯混合模型 使用高斯混合模型创建训练集,根据该训练集评估每个变异位点的可信度。每次运行VariantRecali...

  • 高斯混合模型

    Gaussian Mixture Model 事实上,GMM 和 k-means 很像,不过 GMM 是学习出一些...

  • 高斯混合模型

    高斯混合模型假设每个簇的数据都是符合高斯分布(正太分布)的,当前数据呈现的分布就是各个簇的高斯分布叠加在一起的结果...

  • 高斯混合模型

    简述:高斯混合模型是一种常见的聚类算法,与K均值算法类似,同样使用了EM算法进行迭代。高斯混合模型假设每个簇的数据...

网友评论

      本文标题:从0实现高斯混合模型(EM-GMM)

      本文链接:https://www.haomeiwen.com/subject/eqvahqtx.html