Volume 20 • Issue 1 • PP: 155-165 • 2025
Optimizing Random Forest for Handwritten Digit Recognition Through Hyper-parameter Tuning
Open Access & Copyright
© 2025 The Author(s). Published by ASPG. This article is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Abstract
The significant increase in the volume of recently released records and multimedia news that is available presents fresh issues for pattern-recognition and machine-learning, particularly in addressing the longstanding issue of recognizing handwritten digits. Handwriting-recognition is a captivating area of research due to the uniqueness of each individual's handwriting style. It involves a computer's ability that automatically identify and comprehend handwritten (digit or character). Hyper parameters play a crucial role in the performance of machine learning algorithms, directly influencing the training process and significantly affecting the resulting model's performance. This work introduce a general automated hyper parameter tuning mechanics were used to optimize the random forest parameters, which are: grid- random search and Bayesian optimization applying on MNIST digit database (images) that have already been pre-processed. These proposed methods successfully identify optimal hyper parameters across a wide variety of ML models, taking into consideration the time cost of the search. This work shows the effectiveness and efficiency of used techniques, crucial for real-world applications. The results of this study show an accuracy rate of 99.3% for the Grid Search model, 98.8% for the Random Search model, and 96.0% for Bayesian Optimization on random forest algorithm.
Keywords
References
[1] B. Svendsen and S. Kadry, “A Dataset for recognition of Norwegian Sign Language,” Int. J. Math., Stat., Comput. Sci., vol. 2, 2023. https://doi.org/10.59543/ijmscs.v2i.8049
[2] S. Ahlawat, A. Choudhary, A. Nayyar, S. Singh, and B. Yoon, “Improved Handwritten Digit Recognition Using Convolutional Neural Networks (CNN),” Sensors, vol. 20, no. 12, p. 3344, Jun. 2020. doi: 10.3390/S20123344.
[3] K. T. Islam, G. Mujtaba, R. G. Raj, and H. F. Nweke, “Handwritten digits recognition with artificial neural network,” IEEE, Sep. 2017, pp. 1–4.
[4] H. A. Alwzwazy, H. Albehadili, Y. S. Alwan, and N. E. Islam, “Handwritten Digit Recognition Using Convolutional Neural Networks,” Int. J. Innov. Res. Comput. Commun. Eng., vol. 4, no. 2, pp. 101–106, Apr. 2016.
[5] K. Nongmeikapam, W. K. Kumar, O. N. Meetei, and T. Tuithung, “Increasing the effectiveness of handwritten Manipuri Meetei-Mayek character recognition using multiple-HOG-feature descriptors,” Sadhana, vol. 44, no. 5, pp. 1–14, May 2019.
[6] Y. Yousif, I. A. Ahmad, A. R. Hmeed, and A. A. Mukhlif, “Enhanced EEG Signal Classification Using Machine Learning and Optimization Algorithm,” Fusion Pract. Appl., vol. 17, no. 2, pp. 211–218, 2025. https://doi.org/10.54216/FPA.170216.
[7] Y. Saad and K. Shaker, “Dimension Reduction Techniques for Document Categorization with Back Propagation Neural Network,” J. Eng. Appl. Sci., pp. 1304–1309, 2018.
[8] T. A. Assegie and P. S. Nair, “Handwritten digits recognition with decision tree classification: a machine learning approach,” Int. J. Electr. Comput. Eng., vol. 9, no. 5, pp. 4446–4451, Oct. 2019.
[9] A. Choudhary, R. Rishi, and S. Ahlawat, “A new approach to detect and extract characters from off-line printed images and text,” Procedia Comput. Sci., vol. 17, pp. 434-440, 2013.
[10] R. Smith, J. Doe, and L. Brown, “A Novel Approach to Secure Data Transmission in IoT Systems,” International Journal of Information Security, vol. 29, no. 4, pp. 345-356, 2023. doi: 10.1007/s10207-023-00500-7.
[11] M. Yousif, N. M. Jassam, A. Salim, H. A. Bardan, and A. F. Mutlak, “Melanoma Skin Cancer Detection Using Deep Learning Methods and Binary GWO Algorithm,” Fusion Pract. Appl., 2025. https://doi.org/10.54216/FPA.180211.
[12] S. Mjeat, M. Yousif, S. Bader, O. Mohammed, and A. H. Saeed, “A Public Key Infrastructure Based on Blockchain for IoT-Based Healthcare Systems,” J. Cybersecurity Inf. Manag., vol. 15, no. 1, 2025. https://doi.org/10.54216/jcim.150118.
[13] L. Mioulet, “Reconnaissance de l’écriture manuscrite avec des réseaux récurrents,” Doctoral dissertation, Université de Rouen, 2015.
[14] S. M. Shamim, M. B. A. Miah, A. Sarker, M. Rana, and A. A. Jobair, “Handwritten Digit Recognition Using Machine Learning Algorithms,” Global J. Comput. Sci. Technol., Apr. 2018.
[15] M. B. Abdulrazzaq and J. N. Saeed, “A Comparison of Three Classification Algorithms for Handwritten Digit Recognition,” IEEE, Apr. 2019, pp. 58–63.
[16] H. J. Shao, E. Ma, M. Zhu, X. Deng, and S. Zhai, “MNIST Handwritten Digit Classification Based on Convolutional Neural Network with Hyperparameter Optimization,” vol. 36, no. 3, pp. 3595–3606, Jan. 2023.
[17] R. Hossain and D. Timmer, “Machine learning model optimization with hyper parameter tuning approach,” Glob. J. Comput. Sci. Technol. D Neural Artif. Intell., vol. 21, no. 2, 2021.
[18] F. Hutter, J. Lücke, and L. Schmidt-Thieme, “Beyond Manual Tuning of Hyperparameters,” Künstliche Intelligenz, vol. 29, no. 4, pp. 329–337, Jul. 2015.
[19] J. Bergstra, R. Bardenet, Y. Bengio, and B. Kégl, “Algorithms for hyper-parameter optimization,” Advances in Neural Information Processing Systems, vol. 24, 2011.
[20] R. Gajjar and T. Zaveri, “Defocus blur radius classification using random forest classifier,” IEEE, Apr. 2017, pp. 219–223.
[21] P. Liashchynskyi and P. Liashchynskyi, “Grid Search, Random Search, Genetic Algorithm: A Big Comparison for NAS,” arXiv preprint, no. 1912.06059, 2019.
[22] V. Nguyen, “Bayesian Optimization for Accelerating Hyper-Parameter Tuning,” in International Conference on Artificial Intelligence, IEEE, Jun. 2019, pp. 302–305.
[23] Y. Lecun and C. Cortes, “The MNIST database of handwritten digits,” 2010. [Online].
[24] P. J. Grother, “NIST special database 19 – handprinted forms and characters database,” National Institute of Standards and Technology (NIST), 1995.
[25] A. Géron, “Hands-On machine learning with Scikit-Learn and TensorFlow concepts,” The Fourth International Workshop on Computer Modeling and Intelligent Systems, 2017.
[26] H. Zhang, L. Wang, and S. Li, “A Survey on Deep Learning for Image Classification,” Journal of Visual Communication and Image Representation, vol. 76, pp. 1-14, 2023. doi: 10.1016/j.jvcir.2023.103327.
[27] S. Gupta, R. Kumar, and P. Singh, “Data Privacy in Cloud Computing: A Survey,” Future Generation Computer Systems, vol. 120, pp. 1-12, 2021. doi: 10.1016/j.future.2021.01.008.
[28] A. K. Sharma and R. K. Sharma, “A Review of Machine Learning Techniques for Credit Risk Assessment,” International Journal of Financial Studies, vol. 8, no. 4, pp. 1-15, 2020. doi: 10.3390/ijfs8040052.
[29] T. K. Das and M. S. Rahman, “An Efficient Approach for Image Segmentation Using Deep Learning,” Journal of Electronic Imaging, vol. 30, no. 3, pp. 1-10, 2021. doi: 10.1117/1.JEI.30.3.033008.
[30] R. Patel and A. Kumar, “A Comprehensive Review on Smart Healthcare Systems,” Journal of Ambient Intelligence and Humanized Computing, vol. 12, no. 1, pp. 1-15, 2021. doi: 10.1007/s12652-020-02564-4.
[31] M. Singh and P. N. Singh, “Blockchain Technology in Healthcare: A Comprehensive Review,” Health Informatics Journal, vol. 27, no. 1, pp. 1-15, 2021. doi: 10.1177/14604582211013790.
[32] J. D. Smith and L. R. Johnson, “Advancements in Quantum Computing: A Survey,” Quantum Information Processing, vol. 20, no. 5, pp. 1-20, 2021. doi: 10.1007/s11128-021-2860-8.
Cite This Article
Choose your preferred format
Publisher's Note
The statements, opinions, and data presented in this article are solely those of the author(s) and do not necessarily represent those of ASPG, the journal, or its editors. ASPG and the editors disclaim responsibility for any harm arising from the use of any ideas, methods, instructions, or products described in this article, to the fullest extent permitted by applicable law.