For multiple groups of n points with a certain class c, I assigned the class whose points were closest on average to my point p.
Read here about the dataset.
To run the code first you must have Python installed on your computer. If you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org or if you are working in a Virtual Environment created by virtualenv or pyvenv then Pip is also installed.
After cloning this git directory,
$ pip install numpy
if you're using Python 2 or
$ pip3 install numpy
if you're using Python 3.
knnvalidation.py
prints out the errorcount and knntest.py
labels the images in /digitsDataset
.
Expect the programs to take a few minutes to complete.
Data is read from /digitsDataset
and results are written to that directory.