mirror of
https://github.com/apachecn/ailearning.git
synced 2026-05-07 06:03:16 +08:00
增加局部最优图片
This commit is contained in:
@@ -131,8 +131,11 @@ def kMeans(dataSet, k, distMeas=distEclud, createCent=randCent):
|
||||
> 在 kMeans 的函数测试中,可能偶尔会陷入局部最小值(局部最优的结果,但不是全局最优的结果).
|
||||
|
||||
### K-Means 聚类算法的缺陷
|
||||
在 kMeans 的函数测试中,可能偶尔会陷入局部最小值(局部最优的结果,但不是全局最优的结果).
|
||||
所以为了克服 KMeans 算法收敛于局部最小值的问题,有更厉害的大佬提出了另一个称为二分K-均值(bisecting K-Means)的算法.
|
||||
在 kMeans 的函数测试中,可能偶尔会陷入局部最小值(局部最优的结果,但不是全局最优的结果).
|
||||
局部最小值的的情况如下:
|
||||

|
||||
|
||||
所以为了克服 KMeans 算法收敛于局部最小值的问题,有更厉害的大佬提出了另一个称之为二分K-均值(bisecting K-Means)的算法.
|
||||
|
||||
### 二分 K-Means 聚类算法
|
||||
该算法首先将所有点作为一个簇,然后将该簇一分为二。
|
||||
|
||||
BIN
images/10.KMeans/apachecn-kmeans-partial-best-result-1.jpg
Normal file
BIN
images/10.KMeans/apachecn-kmeans-partial-best-result-1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Reference in New Issue
Block a user