from sklearn import neighbors
from sklearn import datasets

knn = neighbors.KNeighborsClassifier()

iris = datasets.load_iris()

#数据的初始计算值和结果值
knn.fit(iris.data, iris.target)

predictedLabel = knn.predict([[0.1, 0.2, 0.3, 0.4]])
print("hello")

#print ("predictedLabel is :" + predictedLabel)
print(predictedLabel)

参考相关内容