摘要: import numpy as np x = np.random.randint(1, 100, [20, 1]) y = np.zeros(20) k = 3 # 选取数据空间中的K个对象作为初始中心,每个对象代表一个聚类中心; def initcenter(x, k): return x[0:k].reshape(k) def nearest(kc, i): ... 阅读全文
posted @ 2018-10-31 21:57 陈松林 阅读(170) 评论(0) 推荐(0)