Skip to content

JingTongsh/EM-and-GMM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K-means and GMM-EM

用Python实现用于聚类的K-means算法和EM算法,将训练过程可视化,并与sklearn对比。

使用环境

python 3.9.12
numpy 1.21.5
matplotlib 3.5.1
scikit-learn 1.0.2

结果

一次较好的结果

K-means算法训练过程

fig

EM算法训练过程

fig

训练集结果

fig

测试集结果

fig

训练得比较好,看起来甚至比sklearn更接近中心。

一次较差的结果

K-means算法训练过程

fig

EM算法训练过程

fig

训练集结果

fig

测试集结果

fig

训练得比较差,可能是陷入了局部极小,或许需要更好的初值。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages