Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
python knn
no vote
# -*- coding: utf-8 -* from numpy import * import operator def createDataSet(): group = array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]]) labels=['A','A','B','B'] return group,labels # Special attention to Numpy matrix expression: a=array ([[1,2,3],[4,5,6]]) this is a 2-by-3 matrix # The DataSet group
mousedd2486059
2016-08-23
0
1
No more~