Skip to main content

Comparison of kNN Classifier and Simple Neural Network in Handwritten Digit Recognition Using MNIST Database

  • Conference paper
  • First Online:
Information and Software Technologies (ICIST 2023)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1979))

Included in the following conference series:

  • 135 Accesses

Abstract

The choice of the appropriate method in the classification task is most often a problem related to the adaptation of the input data to the classifier. However, adaptation alone does not result in high classification scores. In this paper, we present a comparison of two artificial intelligence methods for recognizing and classifying the handwriting of digits. The study was based on the popular MNIST database, and we dug up algorithms such as K-nearest neighbors and also neural networks to conduct the study. The paper presents mathematical models of selected tools and selected network architecture. Then, the results of the research carried out in order to choose a more accurate character classification technique are presented. For the purpose of verification, the accuracy metric and the analysis using the error matrix were used. Article also includes analysis of different variables to used methods, like metrics (Euclidean, Manhattan and Chebyshev) or hyperparameter k.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Cui, P., Athey, S.: Stable learning establishes some common ground between causal inference and machine learning. Nat. Mach. Intell. 4, 110–115 (2022)

    Article  Google Scholar 

  2. Ke, Q., SiƂka, J., Wieczorek, M., Bai, Z., WoĆșniak, M.: Deep neural network heuristic hiearchization for cooperative intelligent transportation fleet management. IEEE Trans. Intell. Transp. Syst. 23, 16752–16762 (2022)

    Article  Google Scholar 

  3. Esterhuizen, J.A., Goldsmith, B.R., Linic, S.: Interpretable machine learning for knowledge generation in heterogeneous catalysis. Nat. Catalysis 5, 175–184 (2022)

    Article  Google Scholar 

  4. PoƂap, D., WoĆșniak, M.: A hybridization of distributed policy and heuristic augmentation for improving federated learning approach. Neural Netw. 146, 130–140 (2022)

    Article  Google Scholar 

  5. Rajeshkumar, G., et al.: Smart office automation via faster RCNN based face recognition and internet of things. Measur.: Sens. 27, 100719 (2023)

    Google Scholar 

  6. SiƂka, J., Wieczorek, M., WoĆșniak, M.: Recurrent neural network model for high-speed train vibration prediction from time series. Neural Comput. Appl. 34, 13305–13318 (2022)

    Article  Google Scholar 

  7. de Andrés-Sånchez, J.: A systematic review of the interactions of fuzzy set theory and option pricing. Expert Syst. Appl., 119868 (2023)

    Google Scholar 

  8. WoĆșniak, M., Zielonka, A., Sikora, A., Piran, M.J., Alamri, A.: 6g-enabled IoT home environment control using fuzzy rules. IEEE Internet Things J. 8, 5442–5452 (2020)

    Article  Google Scholar 

  9. Abualigah, L., et al.: Meta-heuristic optimization algorithms for solving real-world mechanical engineering design problems: a comprehensive survey, applications, comparative analysis, and results. Neural Comput. Appl., 1–30 (2022)

    Google Scholar 

  10. Sikora,A., Zielonka, A., WoĆșniak, M.: Heuristic optimization of 18-pulse rectifier system. In: 2021 IEEE Congress on Evolutionary Computation (CEC), pp. 673–680. IEEE (2021)

    Google Scholar 

  11. Marewski, J.N., Gigerenzer, G.: Heuristic decision making in medicine. Dial. Clin. Neurosci. (2022)

    Google Scholar 

  12. PoƂap, D., Srivastava, G.: Neural image reconstruction using a heuristic validation mechanism. Neural Comput. Appl. 33, 10787–10797 (2021)

    Article  Google Scholar 

  13. Prokop, K., PoƂap, D., Srivastava, G., Lin, J.C.-W.: Blockchain-based federated learning with checksums to increase security in internet of things solutions. J. Ambient Intell. Human. Comput., 1–10 (2022)

    Google Scholar 

  14. Kumar, S., Sahoo, S., Lim, W.M., Kraus, S., Bamel, U.: Fuzzy-set qualitative comparative analysis (FSQCA) in business and management research: a contemporary overview. Technol. Forecast. Soc. Chang. 178, 121599 (2022)

    Article  Google Scholar 

  15. Haseeb, J., Mansoori, M., Hirose, Y., Al-Sahaf, H., Welch, I.: Autoencoder-based feature construction for iot attacks clustering. Futur. Gener. Comput. Syst. 127, 487–502 (2022)

    Article  Google Scholar 

  16. Zhang, J., Li, Y., Xiong, H., Dou, D., Miao, C., Zhang, D.: Handgest: Hierarchical sensing for robust-in-the-air handwriting recognition with commodity wifi devices. IEEE Internet Things J. 9, 19529–19544 (2022)

    Article  Google Scholar 

Download references

Acknowledgments

We would like to express our gratitude to the creators of MNIST for making this valuable data available on Kaggle. The efforts of the National Institute of Standards and Technology in collecting and curating this dataset are greatly appreciated.

‱ MNIST Dataset on Kaggle: https://www.kaggle.com/datasets/crawford/emnist.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Wiktoria Koman or Kuba MaƂecki .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Koman, W., MaƂecki, K. (2024). Comparison of kNN Classifier and Simple Neural Network in Handwritten Digit Recognition Using MNIST Database. In: Lopata, A., Gudonienė, D., Butkienė, R. (eds) Information and Software Technologies. ICIST 2023. Communications in Computer and Information Science, vol 1979. Springer, Cham. https://doi.org/10.1007/978-3-031-48981-5_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-48981-5_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-48980-8

  • Online ISBN: 978-3-031-48981-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics