4-4 分类准确度
使用accuracy来评价KNN算法对手写数据集的分类效果
加载手写数据集
from sklearn import datasets
digits = datasets.load_digits()some_digit = X[666]
some_digit_image = some_digit.reshape(8, 8)
plt.imshow(some_digit_image, cmap = matplotlib.cm.binary)
plt.show()train_test_split + KNN + accuracy
scikit-learn中的accuracy_score
Last updated
