Classifying Electronic Health Records with Long Short-Term Memory and Gated Recurrent Unit Networks

Main Article Content

Dian Kurniasari
Zida Bunga Sobara
Riza Sawitri

Abstract

Electronic Health Records (EHR) are a complete digital store of medical information which contains valuable information about a person’s health status. These data are an important tool for health care professionals to decide the management of the patient, i.e. the need for hospitalization (inpatient care) or outpatient treatment. The importance of EHR data underscores the need for hospitals to act quickly and develop appropriate follow-up for patients. The aim of this study is to assess and compare the performance of two deep learning models, Long Short Term Memory (LSTM) and Gated Recurrent Unit (GRU) for accurate classification of EHR data to predict whether a patient is hospitalized (inpatient or outpatient) based on laboratory test results. This study aims to compare these models to identify the best way to classify patient treatment needs. The data set used in this study is EHR data from a private hospital in Indonesia which contains haematocrit, haemoglobin, erythrocytes, leukocytes, thrombocytes, MCH, MCHC, MCV, age, gender, and source (inpatient or outpatient). The data was pre-processed by labelling, variable selection and handling missing and duplicate values. The data set is split for training and testing the models, LSTM and GRU. Performance evaluation is based on accuracy, training time and other relevant metrics to evaluate both the classification precision and computational efficiency of the models. The classification accuracies of the two models were close to each other with LSTM being 75.57% and GRU being 75.34%. However, GRU showed better training efficiency, executing faster than LSTM model. In the cases where the training time efficiency is the priority, the GRU model is the better choice for its faster speed. However, LSTM performs slightly better in terms of accuracy, especially in classifying outpatient cases, making it more appropriate for applications where accuracy is of high importance.

Article Details

Section
Articles

References

[1] Bambang Tutuko, Siti Nurmaini, Muhammad Naufal Rachmatullah, Annisa Darmawahyuni, and Firdaus Firdaus. A Deep Learning Approach to Integrate Medical Big Data for Improving Health Services in Indonesia. Computer Engineering and Applications Journal, 9(1):17–28, 2020.

[2] Ismail Keshta and Ammar Odeh. Security and Privacy of Electronic Health Records: Concerns and Challenges. Egyptian Informatics Journal, 22(2):177–183, 2021.

[3] Mujiono Sadikin, Ida Nurhaida, and Ria Puspita Sari. Exploratory Study of Some Machine Learning Techniques to Classify the Patient Treatment. International Journal of Advanced Computer Science and Applications, 12(2), 2021.

[4] Rizka Rosita, Dwika Ananda Agustina Pertiwi, and Oktaria Gina Khoirunnisa. Prediction of Hospital Intensive Patients Using Neural Network Algorithm. Journal of Soft Computing Exploration, 3(1):8–11, 2022.

[5] Jose Roberto Ayala Solares, Francesca Elisa Diletta Raimondi, Yajie Zhu, Fatemeh Rahimian, Dexter Canoy, Jenny Tran, Ana Catarina Pinho Gomes, Amir H. Payberah, Mariagrazia Zottoli, Milad Nazarzadeh, et al. Deep Learning for Electronic Health Records: A Comparative Review of Multiple Deep Neural Architectures. Journal of Biomedical Informatics, 101:103337, 2020.

[6] Laila Rasmy, Jie Zhu, Zhiheng Li, Xin Hao, Hong Thoai Tran, Yujia Zhou, Firat Tiryaki, Yang Xiang, Hua Xu, and Degui Zhi. Simple Recurrent Neural Networks Is All We Need for Clinical Events Predictions Using EHR Data. arXiv, abs/2110.00998, 2021.

[7] Ibomoiye Domor Mienye, Theo G. Swart, and George Obaido. Recurrent Neural Networks: A Comprehensive Review of Architectures, Variants, and Applications. Information, 15(9):517, 2024.

[8] Sepp Hochreiter and Jürgen Schmidhuber. Long Short-Term Memory. Neural Computation, 9(8):1735–1780, 1997.

[9] Kyunghyun Cho, Bart van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. On the Properties of Neural Machine Translation: Encoder–Decoder Approaches. In Proceedings of the Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation (SSST-8), pages 103–111, 2014.

[10] Kamilya Smagulova and Alex Pappachen James. Overview of Long Short-Term Memory Neural Networks. In Deep Learning Classifiers with Memristive Networks: Theory and Applications, pages 139–153. Springer, 2019.

[11] Guizhu Shen, Qingping Tan, Haoyu Zhang, Ping Zeng, and Jianjun Xu. Deep Learning with Gated Recurrent Unit Networks for Financial Sequence Predictions. Procedia Computer Science, 131:895–903, 2018.

[12] Awais Ashfaq, Anita Sant'Anna, Markus Lingman, and Sławomir Nowaczyk. Readmission Prediction Using Deep Learning on Electronic Health Records. Journal of Biomedical Informatics, 97:103256, 2019.

[13] Shudong Yang, Xueying Yu, and Ying Zhou. LSTM and GRU Neural Network Performance Comparison Study: Taking Yelp Review Dataset as an Example. In 2020 International Workshop on Electronic Communication and Artificial Intelligence (IWECAI), pages 98–101. IEEE, 2020.

[14] Lu Men, Noyan Ilk, Xinlin Tang, and Yuan Liu. Multi-Disease Prediction Using LSTM Recurrent Neural Networks. Expert Systems with Applications, 177:114905, 2021.

[15] Luis Alfredo Moctezuma, Yoko Suzuki, Junya Furuki, Marta Molinas, and Takashi Abe. GRU-powered Sleep Stage Classification with Permutation-Based EEG Channel Selection. Scientific Reports, 14(1):17952, 2024.

[16] Arpita Saha, Maggie Samaan, Bo Peng, and Xia Ning. A Multi-Layered GRU Model for COVID-19 Patient Representation and Phenotyping from Large-Scale EHR Data. In Proceedings of the 14th ACM International Conference on Bioinformatics, Computational Biology, and Health Informatics, pages 1–6. ACM, 2023.

[17] Christo El Morr, Manar Jammal, Hossam Ali-Hassan, and Walid El-Hallak. Machine Learning for Practical Decision Making. Springer, 2022.

[18] Eunjung Kwon, Hyunho Park, Sungwon Byon, and Kyu-Chul Lee. Improving Text Classification Performance through Data Labeling Adjustment. In 2022 13th International Conference on Information and Communication Technology Convergence (ICTC), pages 2277–2279. IEEE, 2022.

[19] Anwar Ul Haq, Defu Zhang, He Peng, and Sami Ur Rahman. Combining Multiple Feature-Ranking Techniques and Clustering of Variables for Feature Selection. IEEE Access, 7:151482–151492, 2019.

[20] Amir Moslemi. A Tutorial-Based Survey on Feature Selection: Recent Advancements on Feature Selection. Engineering Applications of Artificial Intelligence, 126:107136, 2023.

[21] Dipti Theng and Kishor K. Bhoyar. Feature Selection Techniques for Machine Learning: A Survey of More than Two Decades of Research. Knowledge and Information Systems, 66(3):1575–1637, 2024.

[22] Wuxing Chen, Kaixiang Yang, Zhiwen Yu, Yifan Shi, and C. L. Philip Chen. A Survey on Imbalanced Learning: Latest Research, Applications and Future Directions. Artificial Intelligence Review, 57(6):137, 2024.

[23] Preston Billion Polak, Joseph D. Prusa, and Taghi M. Khoshgoftaar. Low-Shot Learning and Class Imbalance: A Survey. Journal of Big Data, 11(1):1, 2024.

[24] Roderick J. A. Little and Donald B. Rubin. Statistical Analysis with Missing Data. John Wiley & Sons, 3 edition, 2019.

[25] Ardalan Mirzaei, Stephen R. Carter, Asad E. Patanwala, and Carl R. Schneider. Missing Data in Surveys: Key Concepts, Approaches, and Applications. Research in Social and Administrative Pharmacy, 18(2):2308–2316, 2022.

[26] Mustafa Alabadla, Fatimah Sidi, Iskandar Ishak, Hamidah Ibrahim, Lilly Suriani Affendey, Zafienas Che Ani, Marzanah A. Jabar, Umar Ali Bukar, Navin Kumar Devaraj, Ahmad Sobri Muda, et al. Systematic Review of Using Machine Learning in Imputing Missing Values. IEEE Access, 10:44483–44502, 2022.

[27] Jiaxu Peng, Jungpil Hahn, and Ke-Wei Huang. Handling Missing Values in Information Systems Research: A Review of Methods and Assumptions. Information Systems Research, 34(1):5–26, 2023.

[28] Navin Kumar Manaswi. Basics of TensorFlow. In Deep Learning with Applications Using Python: Chatbots and Face, Object, and Speech Recognition with TensorFlow and Keras, pages 1–30. Apress, 2018.

[29] Mehrnaz Faraz, Hamid Khaloozadeh, and Milad Abbasi. Stock Market Prediction Based on Autoencoder Long Short-Term Memory Networks. In 2020 28th Iranian Conference on Electrical Engineering (ICEE), pages 1–5. IEEE, 2020.

[30] Nan Luo, Xiaojing Zhong, Luxin Su, Zilin Cheng, Wenyi Ma, and Pingsheng Hao. Artificial Intelligence-assisted Dermatology Diagnosis: From Unimodal to Multimodal. Computers in Biology and Medicine, 165:107413, 2023.

[31] Gissel Velarde, Pedro Brañez, Alejandro Bueno, Rodrigo Heredia, and Mateo Lopez-Ledezma. An Open Source and Reproducible Implementation of LSTM and GRU Networks for Time Series Forecasting. Engineering Proceedings, 18(1):30, 2022.

[32] Rui-Qing Yan, Wei Liu, Meng Zhu, Yi-Jing Wang, Cong Dai, Shuo Cao, Kang Wu, Yu-Chen Liang, Xian-Chuan Yu, and Meng-Fei Zhang. Real-Time Abnormal Light Curve Detection Based on a Gated Recurrent Unit Network. Research in Astronomy and Astrophysics, 20(1):007, 2020.

[33] Divish Rengasamy, Mina Jafari, Benjamin Rothwell, Xin Chen, and Grazziela P. Figueredo. Deep Learning with Dynamically Weighted Loss Function for Sensor-Based Prognostics and Health Management. Sensors, 20(3):723, 2020.

[34] Xue Ying. An Overview of Overfitting and Its Solutions. In Journal of Physics: Conference Series, volume 1168, page 022022. IOP Publishing, 2019.

[35] Quang Hung Nguyen, Hai-Bang Ly, Lanh Si Ho, Nadhir Al-Ansari, Hiep Van Le, Van Quan Tran, Indra Prakash, and Binh Thai Pham. Influence of Data Splitting on Performance of Machine Learning Models in Prediction of Shear Strength of Soil. Mathematical Problems in Engineering, 2021:4832864, 2021.

[36] Ismail Muraina. Ideal Dataset Splitting Ratios in Machine Learning Algorithms: General Concerns for Data Scientists and Data Analysts. In Proceedings of the 7th International Mardin Artuklu Scientific Research Conference, pages 496–504, 2022.

[37] Li Yang and Abdallah Shami. On Hyperparameter Optimization of Machine Learning Algorithms: Theory and Practice. Neurocomputing, 415:295–316, 2020.

[38] Md Riyad Hossain and Douglas Timmer. Machine Learning Model Optimization with Hyperparameter Tuning Approach. Global Journal of Computer Science and Technology: D Neural & Artificial Intelligence, 21(2), 2021.

[39] Sebastian Simon, Nikolay Kolyada, Christopher Akiki, Martin Potthast, Benno Stein, and Norbert Siegmund. Exploring Hyperparameter Usage and Tuning in Machine Learning Research. In 2023 IEEE/ACM 2nd International Conference on AI Engineering – Software Engineering for AI (CAIN), pages 68–79. IEEE, 2023.

[40] Justus Ilemobayo, Olamide Durodola, Oreoluwa Alade, Opeyemi J. Awotunde, Adewumi T. Olanrewaju, Olumide Falana, Adedolapo Ogungbire, Abraham Osinuga, Dabira Ogunbiyi, Ark Ifeanyi, et al. Hyperparameter Tuning in Machine Learning: A Comprehensive Review. Journal of Engineering Research and Reports, 26(6):388–395, 2024.

[41] Kai Ming Ting. Confusion Matrix. In Claude Sammut and Geoffrey I. Webb, editors, Encyclopedia of Machine Learning, pages 209–210. Springer, 2011.