本文主要介绍“如何实现Python机器学习k近邻算法”。在日常操作中,相信很多人对于Python机器学习k-近邻算法如何实现都有疑问。边肖查阅了各种资料,整理出简单易用的操作方法,希望能帮助大家解答“如何实现Python机器学习k-近邻算法”的疑惑!接下来,请和边肖一起学习!
K-近邻算法概述
简单来说,k近邻算法采用测量不同特征值之间距离的方法进行分类。
K-最近邻算法
优点:精度高,对异常值不敏感,无数据输入假设。
缺点:具有高计算复杂度和高空间复杂度。
适用数据范围:数值型和标称型。
00-1010,有一个样本数据集,也称为训练样本集,样本集中的每个数据都有一个标签,样本集中每个数据与其分类的对应关系是已知的。
在输入无标签的新数据后,将新数据的每个特征与样本集中数据的对应特征进行比较,然后算法提取样本集中特征最相似(最近邻)的数据的分类标签。
一般只选取样本数据集中最相似的前K个数据,这是k-最近邻算法中K的原点,K通常是不大于20的整数。
最后选择K个最相似数据中出现频率最高的分类作为新数据的分类。
k-最近邻算法的一般流程
任何方法都可以用来收集数据:
为距离计算所需的数值准备数据:最好是结构化数据格式。
数据:可以通过任何方法进行分析。
训练算法:这一步不适用于k近邻算法。
测试:计算错误率。
使用算法:我们需要先输入样本数据和结构化输出结果,然后运行k-近邻算法,分别确定输入数据属于哪个分类,最后对计算出的分类进行后续处理。
fromnumpyimport *
importoperatordefcreateDataSet():
group=array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]])
标签=['A ',' A ',' B ',' B']
returngroup,labelsgroup,labels=CreateDataSet()group array([[1。1.1],
[1.1.],
[0.0.],
[0.0.1]])标签['A ',' A ',' B ',' B ']A=平铺([3,3],(4,1))
aarray([[3,3],
[3,3],
[3,3],
[3,3]])
工作原理
伪码如下:
对于数据集中具有未知类别属性的每个点,顺序执行以下操作:
计算已知类别数据集中的点与当前点之间的距离;
根据距离
离递增次序排序;
选取与当前点距离最小的k个点;
确定前k个点所在类别的出现频率;
返回前k个点出现频率最高的类别作为当前点的预测分类。
def classify0(inX, dataSet, labels, k): dataSetSize = dataSet.shape[0] diffMat = tile(inX,(dataSetSize,1)) - dataSet sqDiffMat = diffMat**2 sqDistances = sqDiffMat.sum(axis=1) distances = sqDistances**0.5 sortedDistIndicies = distances.argsort() classCount = {} for i in range(k): voteIlabel = labels[sortedDistIndicies[i]] classCount[voteIlabel] = classCount.get(voteIlabel,0) + 1 sortedClassCount = sorted(classCount.items(),key = operator.itemgetter(1), reverse=True) return sortedClassCount[0][0]
classify0([0,0],group,labels,3)
'B'
示例:手写识别系统
数据集如下图:
示例: 使用k-近邻算法的手写识别系统
-
收集数据: 提供文本文件。
-
准备数据: 编写函数 classify0(), 将图像格式转换为分类器使用的list格式。
-
分析数据: 在Python命令提示符中检查数据, 确保它符合要求。
-
训练算法: 此步骤不适用于 k-近邻算法。
-
测试算法: 编写函数使用提供的部分数据集作为测试样本, 测试样本与非测试样本 的区别在于测试样本是已经完成分类的数据, 如果预测分类与实际类别不同, 则标记 为一个错误。
-
使用算法:本例没有完成此步骤,若你感兴趣可以构建完整的应用程序,从图像中提 取数字, 并完成数字识别, 美国的邮件分栋系统就是一个实际运行的类似系统。
图像转换为向量
def img2vector(filename): returnVect = zeros((1,1024)) fr = open(filename) for i in range(32): lineStr = fr.readline() for j in range(32): returnVect[0,32*i+j] = int(lineStr[j]) return returnVect
testVector = img2vector('digits/testDigits/0_13.txt') testVector[0,0:31]
array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
from os import listdir
def handwritingClassTest(): hwLables = [] trainingFileList = listdir('digits/trainingDigits') m = len(trainingFileList) trainingMat = zeros((m,1024)) for i in range(m): fileNameStr = trainingFileList[i] fileStr = fileNameStr.split('.')[0] classNumStr = int(fileStr.split('_')[0]) hwLables.append(classNumStr) trainingMat[i,:] = img2vector('digits/trainingDigits/%s' % fileNameStr) testFileList = listdir('digits/testDigits') errorCount = 0.0 mTest = len(testFileList) for i in range(mTest): fileNameStr = testFileList[i] fileStr = fileNameStr.split('.')[0] classNumStr = int(fileStr.split('_')[0]) vectorUnderTest = img2vector('digits/testDigits/%s' % fileNameStr) classifierResult = classify0(vectorUnderTest, trainingMat,hwLables,3) print("the classifier came back width: %d, the real answer is: %d" % (classifierResult,classNumStr)) if(classifierResult != classNumStr): errorCount += 1.0 print("\nthe total number of errors is :%d" % errorCount) print("\nthe total error rate is:%f" % (errorCount/float(mTest)))
handwritingClassTest()
the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 8 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 1 the classifier came back width: 7, the real answer is: 9 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 9 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 9, the real answer is: 3 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 7, the real answer is: 7 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 9, the real answer is: 9 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 6, the real answer is: 6 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 3, the real answer is: 3 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 1, the real answer is: 1 the classifier came back width: 2, the real answer is: 2 the classifier came back width: 8, the real answer is: 8 the classifier came back width: 4, the real answer is: 4 the classifier came back width: 0, the real answer is: 0 the classifier came back width: 5, the real answer is: 5 the classifier came back width: 8, the real answer is: 8 the total number of errors is :10 the total error rate is:0.010571
到此,关于“Python机器学习k-近邻算法怎么实现”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注网站,小编会继续努力为大家带来更多实用的文章!
内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/119048.html