摘要: import numpy as np x=np.random.randint(0,34,20) y=np.zeros(20) k=3 def initcenter(x,k): return x[0:k].reshape(k) def nearest(kc,i): d=(abs(kc-i)) w=np.where(d==np.min(d)) return w[0][... 阅读全文
posted @ 2018-11-05 11:19 DT_TD 阅读(50) 评论(0) 推荐(0) 编辑
摘要: import numpy as npfrom sklearn.datasets import load_irisdata = load_iris()<br><br>print(data)print("数据类型:",type(data))print("数据类目:",data.keys())iris_f 阅读全文
posted @ 2018-11-05 10:54 DT_TD 阅读(144) 评论(0) 推荐(0) 编辑