基于KNN的数字识别
源代码及数据的github地址:
https://github.com/w1449550206/KNN-Handwritten-digit-recognition-based-on-KNN
点此可直达
import numpy as np
# 图片后缀为bmp
import matplotlib.pyplot as plt
%matplotlib inline
from sklearn.neighbors import KNeighborsClassifier
img_path = './data/3/3_10.bmp'
arr_img = plt.imread(img
1