摘要: import numpy as np x = np.random.randint(1, 100, 20) # 产生的20个一到一百的随机整数 y = np.zeros(20) k = 3 print(x) print(y) def initcenter(x, k): # 初始化聚类中心数组 return x[0:k].reshape(k) kc = initcenter(x, k... 阅读全文
posted @ 2018-11-12 10:37 asymptote 阅读(197) 评论(0) 推荐(0) 编辑