In this video you will find an easy explanation of how the KNN algorythm works for handwritten digits recognition.
We use a sample of 2500 digits (250 of each type 0 to 9) to train the algorythm and we have another small sample to test it and see if the Knn algorythm can accurately read handwritten digits.

Source code:

 

Files:

  1. digits.png
  2. test_digits.png