python knn
2016-08-23
0 0 0
no vote
Other
Earn points
# -*- 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
python
pythonknn
Related Source Codes
Word memorization software
0
0
no vote
CWT Python example
0
0
no vote
STFT example
0
0
no vote
Chinese Speech Recognition
0
0
no vote
python-ela
0
0
no vote
No comment