Prediction of the Number of Patient Visits in a Psychiatric Hospital Prof. Dr. M. Ildrem Using Naive Bayesian Algorithm
DOI:
10.47709/cnahpc.v7i1.5145Keywords:
Naive Bayes Algorithm, Mental Hospital, Data Mining, Patient Visit Prediction, Machine LearningDimension Badge Record
Abstract
This study was conducted to predict the number of patient visits at Prof. Dr. M. Ildrem Mental Hospital using the Naive Bayes algorithm, which is relevant given the increasing need for global mental health care. The main problem of this study is the difficulty in managing hospital resources efficiently due to unpredictable fluctuations in the number of patient visits. The research aims to apply the Naive Bayes algorithm to predict the number of patient visits and evaluate their performance. The method used is a naïve Bayes algorithm with systematic steps including historical data collection, data preprocessing using LabelEncoder, and dividing the dataset into training data and test data (80:20) where the training data totals 1331 data and the test data has 333 data. The Naive Bayes model is built and tested with metrics such as accuracy, precision, recall, and F1-score. The results of the study based on confusion matrix analysis, the model achieved an accuracy of 0.8108108108108109 or 81%, a precision of 0.8206686930091185 or 82.07%, a recall value of 0.9926470588235294 or 99.26%, and an F1-score of 0.90 or 90%, which shows that this model is quite effective in predicting service units with the dominance of adolescent category patient data where it is concluded that this prediction model is able to provide accurate estimates of patient visits, supporting the management of hospital resources, and improving the operational efficiency of mental health services. This research is expected to help hospitals in planning facilities and workforce more effectively.
Downloads
Abstract viewed = 68 times
References
Alfarizi, M. R. S., Al-farish, M. Z., Taufiqurrahman, M., Ardiansah, G.,& Elgar, M. (2023). "The Use of Python as a Programming Language for Machine Learning and Deep Learning." Scientific Work of Tawhid Students (KARIMAH TAUHID) 2(1):1–6.
Ambarita, Togi Fitri A. (2020). "Correlation of Psychological Wellbeing with Burnout in Nurses of the Mental Hospital Prof. Ildrem Medan Provincial Government." Journal of Psychology of HKBP University Nommensen 6(2):78–91. doi: 10.36655/psychology.v6i2.138.
Attamami, Nurfazriah, Agung Triayudi, and Rima Tamara Aldisa. (2023). "Performance Analysis of Naive Bayes and C4.5 Classification Algorithms for Prediction of Health Insurance Assistance Recipients." Journal of JTIK (Journal of Information and Communication Technology) 7(2):262–69. doi: 10.35870/jtik.v7i2.756.
Dewi, Christine, R. C. Chen, Christanto, & Cauteruccio. (2023). "Multinomial Naïve Bayes Classifier for Sentiment Analysis of Internet Movie Database." Vietnam Journal of Computer Science 10(4):485–98. doi: 10.1142/S2196888823500100.
Dicky, Rahmat, & Mumpuni. (2024). "Implementation of Naive Bayes' Multinomial Method in Clickbait News Title Classification." Neptune: Journal of Computer Science and Information Technology 2(3):303–16. doi: 10.61132/neptune.v2i3.249.
Fitri, Evita. (2020). "Sentiment Analysis of Ruangguru Application Using Naive Bayes, Random Forest and Support Vector Machine Algorithms." Journal of Transformatika 18(1):71. doi: 10.26623/transformatika.v18i1.2317.
Iqbal, Maulana, Syaripudin, & Nugroho. (2023). "Implementation of Random Forest Algorithm on Stock Price Prediction Based on Historical Data." Jubitek: JOURNAL OF BIG DATA AND INFORMATION TECHNOLOGY 1:42–51.
M. Afriansyah, Saputra, Ardhana, & Sa'adati. (2024). "Efficient Naive Bayes Algorithm for Classification of Plantains Based on Color Features." Journal of Information Systems Management and Digital Business 1(2):236–48. doi: 10.59407/jismdb.v1i2.438.
Mustika, Ardila, Manuhutu, Ahmad, Hasbi, Guntoro, Manuhutu, Ridwan, Hozairi, Wardhani, Alim, Romli, Religia, Octafian, Sufandi, & Ernawati. (2021). Data Mining and Its Applications.
Siallagan, Ance, Girsang, & M. R. Ompusunggu. (2023). "The Relationship between Family Support and the Rate of Schizophrenia Relapse at the Prof. DR. M. Ildrem Medan Psychiatric Hospital in 2023." Tambusai Education Journal 7(3):21747–58.
Tanjung, Yani. (2021). "Optimization of C4.5 Algorithm for Prediction of ATM Machine Failure." Infosys (Information System) Journal 6(1):12. doi: 10.22303/infosys.6.1.2021.12-21.
Tsania, Ratnawati, Rahayudi. (2023). "The Use of the Naïve Bayes Classifier Method in Sentiment Analysis of the Community's Assessment of Hospital Services in." 10(7):1453–60. doi: 10.25126/jtiik.2024117979.
Tugiman, Damayanti, Gunawan, & Elkana. (2022). "Prediction of Drug Use of National Health Insurance Participants Using the Naïve Bayes Classifier Algorithm." Journal of Applied Computer Science and Technology 3(1):144–50. doi: 10.52158/jacost.v3i1.295.
Ulfa, Novia, Handayani, & Gellysa Urva. (2023). "Implementation of the Frequent Pattern Growth Algorithm to Analyze Consumer Shopping Patterns at Pharmacy Hopefully Jaya." JUTEKINF (Journal of Computer and Information Technology) 11(2):154–65. doi: 10.52072/jutekinf.v11i2.663.
Wibowo, Radityo, & Jananto. (2020). "Implementation of FP-Growth Algorithm Association Method Data Mining in Retail Companies." Inspiration: Journal of Information and Communication Technology 10(2):200. doi: 10.35585/inspir.v10i2.2585.
Downloads
ARTICLE Published HISTORY
How to Cite
Issue
Section
License
Copyright (c) 2025 Zidhane Syahputra, Rakhmat Kurniawan

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