Learning to recognize handwritten digits with a K-nearest neighbors classifier