机器学习K近邻算法
摘要:
from numpy import * import operator from os import listdir def classify0(inX, dataSet, labels, k): dataSetSize = dataSet.shape[0] diffMat = tile(inX, (dataSetSize,1)) - dataSet sqDiffMat ... 阅读全文
posted @ 2018-03-07 20:28 HelloWorld!--By-MJY 阅读(130) 评论(0) 推荐(0) 编辑