/K-means-example

使用scipy先进行层次聚类然后在k-means聚类

Primary LanguagePython

K-means-example

使用scipy先进行层次聚类然后在k-means聚类

Requirements

  • Python

Usage

Step 1. Download this repository with git or click the download ZIP button

$ git clone https://github.com/guoswang/K-means-example.git
$ cd K-means-example

Step 2. run k-means_example.py

$ python k-means_example.py

Result

层次聚类结果的树状图:
这里写图片描述
通过观察上面的树状图,我们可以将数据分为4类,聚类结果如下:
这里写图片描述

References

http://blog.csdn.net/elaine_bao/article/details/50242867