2021-09-11
模式识别近邻聚类算法python实现import numpy as np def Nearest_neighbor_clustering_algorithm(data,t): classfiy=[data[0]]#先将第一个数据作为一个聚类 for indata in data: intitaldistance = np.sqrt(sum(np.power((np.array(indata) - np.array(classfiy[0])), 2))) for i in range(len(classfi
原创
2021-09-11 21:26:35 ·
16 阅读 ·
0 评论