Skip to content

Commit 4720f95

Browse files
Update KMeans.py
1 parent b7c7348 commit 4720f95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Chapter_10 KMeans/KMeans.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def kmeans(data, k, centroids):
6060
while change == True:
6161
change = False # 重置
6262
for i in xrange(m):
63-
minDist = np.inf # 设置样本与聚类中心之间的最小的距离,初始值为争取穷
63+
minDist = np.inf # 设置样本与聚类中心之间的最小的距离,初始值为正无穷
6464
minIndex = 0 # 所属的类别
6565
for j in xrange(k):
6666
# 计算i和每个聚类中心之间的距离

0 commit comments

Comments
 (0)