We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7c7348 commit 4720f95Copy full SHA for 4720f95
1 file changed
Chapter_10 KMeans/KMeans.py
@@ -60,7 +60,7 @@ def kmeans(data, k, centroids):
60
while change == True:
61
change = False # 重置
62
for i in xrange(m):
63
- minDist = np.inf # 设置样本与聚类中心之间的最小的距离,初始值为争取穷
+ minDist = np.inf # 设置样本与聚类中心之间的最小的距离,初始值为正无穷
64
minIndex = 0 # 所属的类别
65
for j in xrange(k):
66
# 计算i和每个聚类中心之间的距离
0 commit comments