import myKNN
from numpy import *

# 生成数据集和类别标签
dataSet, labels = myKNN.createDataSet()
# 定义一个未知类别的数据
testX = array([1.2, 1.0])
k = 3
# 调用分类函数对未知数据分类
outputLabel = myKNN.KNNClassify(testX, dataSet, labels, 3)
print("Your input is:", testX, "and classified to class: ", outputLabel)

4bd402b1920d9517e95529cca91a6ce386ea5297
<mask token>

<mask token>
print('Your input is:', testX, 'and classified to class: ', outputLabel)

<mask token>
dataSet, labels = myKNN.createDataSet()
testX = array([1.2, 1.0])
k = 3
outputLabel = myKNN.KNNClassify(testX, dataSet, labels, 3)
print('Your input is:', testX, 'and classified to class: ', outputLabel)

import myKNN
from numpy import *
dataSet, labels = myKNN.createDataSet()
testX = array([1.2, 1.0])
k = 3
outputLabel = myKNN.KNNClassify(testX, dataSet, labels, 3)
print('Your input is:', testX, 'and classified to class: ', outputLabel)

import myKNN
from numpy import *

# 生成数据集和类别标签
dataSet, labels = myKNN.createDataSet()
# 定义一个未知类别的数据
testX = array([1.2, 1.0])
k = 3
# 调用分类函数对未知数据分类
outputLabel = myKNN.KNNClassify(testX, dataSet, labels, 3)
print("Your input is:", testX, "and classified to class: ", outputLabel)
