Study in image classification using nearest neighbors and perceptrons

Jiexiang  Qin


In this paper, we describe our experiments on training a computer to recognize (classify) a black and white image of hand-written digits. The experiments were done using Python. We try two methods to achieve the goal. The first method is k Nearest Neighbors, and the second is a Perceptron (modified to work for more than two classes). The paper describes each of these in detail, including some important implementation details, and reports results for these two methods, as well as some observations about their behavior.


Black and White Image Of Hand-Written Digits; Classify; Pixels; Classification; Learning; Database; Epoch; Training; Perceptron; Accuracy; Percentage; Implementation; Matches; Terminates; Algorithm

Full Text:


Included Database


Verma, S. (2021, April 17). Implementing the perceptron algorithm in Python. Medium. Towards Data Science.

Rosebrock A. (2021, May 12). Implementing the perceptron neural network with python. PyImageSearch.

Corrigan, M. (2016). An introduction to python machine learning with Perceptrons. Codementor.

Paolo D'Elia, Python-Perceptron, Retrieved from: PyPerce patron/.



  • There are currently no refbacks.

Copyright (c) 2023 Jiexiang  Qin

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.