![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
KNN算法
qq_27481087
这个作者很懒,什么都没留下…
展开
-
KNN模型MNIST数据集分类
import gzip, os, sysimport numpy as npimport pylabfrom scipy.stats import multivariate_normalfrom urllib.request import urlretrieveimport matplotlib.pyplot as pltdef download(filename, source='http://yann.lecun.com/exdb/mnist/'): print('Download原创 2021-08-26 11:42:34 · 183 阅读 · 0 评论 -
KNN算法实现
import numpy as npimport matplotlib.pyplot as pltimport operatordef createDataset(): group = np.array([[1.0, 2.0], [1.2, 0.1], [0.1, 1.4], [0.3, 3.5], [1.1, 1.0], [0.5, 1.5]]) labels = np.array(['A', 'A', 'B', 'B', 'A', 'B']) return group,原创 2020-12-16 15:30:19 · 165 阅读 · 0 评论