Forecasting Inpatient and Outpatient Visits for Depressive Disorders: A Comparative Study of Deep Learning Approaches

Nur Izzati Ab Kader, Umi Kalsom Yusof, Mohd Nor Akmal Khalid


Forecasting inpatient and outpatient visits is essential for successful resource allocation and clinical decision-making. The techniques used by previous researchers for forecasting, primarily based on statistical approaches, which often require extensive data preprocessing and expert knowledge, can be time-consuming and difficult. Therefore, this study analyses three current deep learning (DL) algorithms, recurrent neural network (RNN), long short-term memory (LSTM) and gated recurrent unit (GRU), for forecasting inpatient and outpatient visits for depressive disorders. These algorithms are among the most familiar DL techniques for time series and have been used with remarkable success in various contexts. The DL algorithms were evaluated using mean squared error (MSE), root mean squared error (RMSE) and mean absolute error (MAE). Based on the results comparison, LSTM has the best performance (lowest error values) compared to the RNN and GRU. The DL algorithms are also being compared to state-of-the-art algorithms, and the results show that the DL algorithms can accurately forecast inpatient and outpatient visits compared to the previously proposed algorithms. The findings from this study could be helpful in clinical decision-making and resource allocation in mental health care.


Deep learning; Depression; Psychiatric Department; Time series forecasting

Article Metrics

Abstract view : 56 times
PDF - 44 times

Full Text:



P. Junfeng, C. Chen, M. Zhou, X. Xie, Y. Zhou and C. -H. Luo, Peak outpatient and emergency department visit forecasting for patients with chronic respiratory diseases using machine learning methods: retrospective cohort study, JMIR Medical Informatics, 8, 2020, e13075.

B. Morel, G. Bouleux, A. Viallon, M. Maignan, L. Provoost, J. -C. Bernadac, S. Devidal, S. Pillet, A. Cantais and O. Mory, Evaluating the increased burden of cardiorespiratory illness visits to adult emergency departments during flu and bronchiolitis outbreaks in the pediatric population: retrospective multicentric time series analysis, JMIR Public Health and Surveillance, 8, 2022, e25532.

S. Lakshmy, Effective demand forecasting in health supply chains: emerging trend, enablers, and blockers, Logistics, 5, 2021, 1-21.

N. Zhao, K. Charland, M. Carabali, E. O. Nsoesie, M. M. Giroux, E. Rees, M. Yuan, C. G. Balaguera, G. J. Ramirez and K. Zinszer, Machine learning and dengue forecasting: comparing random forests and artificial neural networks for predicting dengue burden at national and sub-national scales in Colombia, PLOS Neglected Tropical Diseases, 14, 2020, e0008056.

X. Liu, F. Gu, Z. Bai, Q. Huang and G. Ma, Forecasting of daily outpatient visits based on genetic programming, Iranian Journal of Public Health, 51, 2022, 1313-1322.

X. Han, F. Jiang, Y. Tang, J. Needleman, M. Guo, Y. Chen, H. Zhou and Y. Liu, Factors associated with 30-day and 1-year readmission among psychiatric inpatients in Beijing China: a retrospective, medical record-based analysis, BMC Psychiatry, 20, 2020, 1-12.

M. A. Khafaie, M. Sayyah and F. Rahim, Extreme pollution, climate change, and depression, Environmental Science and Pollution Research, 26, 2019, 22103-22105.

D. S. P. Nyoni and M. T. Nyoni, Modeling and forecasting major depression cases at Kwekwe General Hospital, Zimbabwe empirical evidence from a box jenkins catch all model, JournalNX, 6, 2020, 134-141.

A. Nori-Sarma, Amruta, S. Sun, Y. Sun, K. R. Spangler, R. Oblath, S. Galea, J. L. Gradus and G. A. Wellenius, Association between ambient heat and risk of emergency department visits for mental health among US adults, 2010 to 2019, JAMA Psychiatry, 79, 2022, 341-349.

L. Jakub, K. Piotrowicz, P. P. Hughes and M. Makara-Studzińska, Weather and aggressive behavior among patients in psychiatric hospitals—an exploratory study, International Journal of Environmental Research and Public Health, 17, 2020, 9121-9233.

J. Christian, P. Zschech and K. Heinrich, Machine learning and deep learning, Electronic Markets, 31, 2021, 685-695.

A. Laith, J. Zhang, A. J. Humaidi, A. Al-Dujaili, Y. Duan, O. Al-Shamma, J. Santamaría, M. A. Fadhel, M. Al-Amidie, and L. Farhan, Review of deep learning: concepts, CNN architectures, challenges, applications, future directions, Journal of Big Data, 8, 2021, 1-74.

M. H. Alsharif, Y. H. Alsharif, K. O. M. Yahya, O. A. Alomari, M. A. M. Albreem and Abu Jahid, Deep learning applications to combat the dissemination of COVID-19 disease: a review, European Review for Medical and Pharmacological Sciences, 24, 2020, 11455-11460.

H. Bi, L. Lu and Y. Meng, Hierarchical attention network for multivariate time series long-term forecasting, Applied Intelligence, 53, 2023, 5060-5071.

Y. Yang, C. Fan and H. Xiong, A novel general-purpose hybrid model for time series forecasting, Applied Intelligence, 52, 2022, 2212-2223.

E. Jangam, A. A. D. Barreto and C. S. R. Annavarapu, Automatic detection of COVID-19 from chest CT scan and chest X-Rays images using deep learning, transfer learning and stacking, Applied Intelligence, 52, 2022, 1-17.

S. M. Cihan, C. Paoli and Ö. D. Incel, Time series forecasting on solar irradiation using deep learning, In 10th International Conference on Electrical and Electronics Engineering (ELECO), Turkey, 2017, 151-155.

A. Zeroual, F. Harrou, A. Dairi and Y. Sun, Deep learning methods for forecasting COVID-19 time-Series data: A Comparative study, Chaos, Solitons & Fractals, 140, 2020, 110121.

J. Wolff, A. Gary, D. Jung, C. Normann, K. Kaier, H. Binder, K. Domschke, A. Klimke and M. Franz, Predicting patient outcomes in psychiatric hospitals with routine data: a machine learning approach, BMC Medical Informatics and Decision Making, 20, 2020, 1-9.

J. Wolff, A. Klimke, M. Marschollek and T. Kacprowski, Forecasting admissions in psychiatric hospitals before and during Covid-19: a retrospective study with routine data, Scientific Reports, 12, 2022, 15912.

S. Ryu, H. J. Nam, J. -M. Kim and S. -W. Kim, Current and future trends in hospital utilization of patients with schizophrenia in Korea: a time series analysis using national health insurance data, Psychiatry Investigation, 18, 2021, 795-800.

S. P. Humaira, I. Nursuprianah and D. Darwan, Forecasting of the number of schizophrenia disorder by using the Box-Jenkins of time series analysis, Journal of Robotics and Control, 1, 2020, 213-219.

S. Vatinee, J. Thongkam and J. Leejongpermpoon, Time series forecasting in anxiety disorders of outpatient visits using data mining, Asia-Pacific Journal of Science and Technology, 20, 2015, 241-253.

A. Payam, A. Ghaleiha, E. Zarean, M. Sadeghifar, M. E. Ghaffari, Z. Taslimi and S. Yazdi-Ravandi, Modelling the frequency of depression using holt-winters exponential smoothing method, Journal of Clinical & Diagnostic Research, 12, 2018, 24-27.

B. Alafchi, S. Y.- Ravandi, R. N.- Vosough, A. Ghaleiha and M. Sadeghifar, Forecasting new cases of bipolar disorder using poisson Hidden Markov model, International Clinical Neuroscience Journal, 5, 2018, 7-10.

S. Ryu, H. J. Nam, S.-H. Baek, M. Jhon, J.-M. Kim and S.-W. Kim, Decline in hospital visits by patients with schizophrenia early in the COVID-19 outbreak in Korea, Clinical Psychopharmacology and Neuroscience, 20, 2022, 185-189.

Z. Li, X. Zhang and Z. Dong, TSF-transformer: a time series forecasting model for exhaust gas emission using transformer, Applied Intelligence, 53, 2023, 17211-17225.

I. Lohrasbinasab, A. Shahraki, A. Taherkordi and A. D. Jurcut, From statistical‐to machine learning‐based network traffic prediction, Transactions on Emerging Telecommunications Technologies, 33, 2022, e4394.

M. D. Prasanna, O. Zimba and A. Y. Gasparyan, Statistical data presentation: a primer for rheumatology researchers, Rheumatology International, 41, 2021, 43-55.

A. Zheng, Q. Fang, Y. Zhu, C. Jiang, F. Jin and Xin Wang, An application of ARIMA model for predicting total health expenditure in China from 1978-2022, Journal of Global Health, 10, 2020, 10803-10810.

J. Mohamed, Time series modeling and forecasting of Somaliland consumer price index: a comparison of ARIMA and regression with ARIMA errors, American Journal of Theoretical and Applied Statistics, 9, 2020, 143-53.

Y. Ning, H. Kazemi and P. Tahmasebi, A comparative machine learning study for time series oil production forecasting: ARIMA, LSTM, and Prophet, Computers & Geosciences, 164, 2022, 105126.

C. Janiesch, P. Zschech and K. Heinrich, Machine learning and deep learning, Electronic Markets, 31, 2021, 685-695.

S. Masum, Y. Liu and J. Chiverton, Multi-step time series forecasting of electric load using machine learning models, Artificial Intelligence and Soft Computing: 17th International Conference, ICAISC 2018, Poland, 2018, 148-159.

B. C. Healy, Machine and deep learning in ms research are just powerful statistics– no, Multiple Sclerosis Journal, 27, 2021, 663–664.

Z. Shen, Y. Zhang, J. Lu, J. Xu and G. Xiao, A novel time series forecasting model with deep learning, Neurocomputing, 396, 2020, 302-313.

S. Leijnen and F. V. Veen, The neural network zoo, Multidisciplinary Digital Publishing Institute Proceedings, USA, 2020, 1-6.

K. Heinrich, P. Zschech, C. Janiesch and M. Bonin, Process data properties matter: Introducing gated convolutional neural networks (GCNN) and key-value-predict attention networks (KVP) for next event prediction with deep learning, Decision Support Systems, 143, 2021, 113494.

X. Li, X. Ma, F. Xiao, F. Wang and S. Zhang, Application of gated recurrent unit (GRU) neural network for smart batch production prediction, Energies, 13, 2020, 6121.

C. Fan, J. Wang, W. Gang and S. Li, Assessment of deep recurrent neural network-based strategies for short-term building energy predictions, Applied Energy, 236, 2019, 700-710.

O. Ozyegen, I. Ilic and M. Cevik, Evaluation of interpretability methods for multivariate time series forecasting, Applied Intelligence, 52, 2022, 1-17.

O. Faust, A. Shenfield, M. Kareem, T. R. San, H. Fujita and U. R. Acharya, Automated detection of atrial fibrillation using long short-term memory network with RR interval signals, Computers in Biology and Medicine, 102, 2018, 327-335.

X. Yu and D. Li, Important trading point prediction using a hybrid convolutional recurrent neural network, Applied Sciences, 11, 2021, 3984.

Z. Karevan and J. A. K. Suykens, Transductive LSTM for time-series prediction: An application to weather forecasting, Neural Networks, 125, 2020, 1-9.

G. Shen, Q. Tan, H. Zhang, P. Zeng and J. Xu, Deep learning with gated recurrent unit networks for financial sequence predictions, Procedia Computer Science, 131, 2018, 895-903.

N. A. P. Rostam, N. H. A. H. Malim, R. Abdullah, A. L. Ahmad, B. S. Ooi and D. J. C. Chan, A complete proposed framework for coastal water quality monitoring system with algae predictive model, IEEE Access, 9, 2021, 108249-108265.

B. C. Mateus, M. Mendes, J. T. Farinha, R. Assis and A. M. Cardoso, Comparing LSTM and GRU models to predict the condition of a pulp paper press, Energies, 14, 2021, 6958.

A. Arundarasi, V. S. Sahithi, C. Gupta, M. Yadav, S. Ahirrao, K. Kotecha, M. Gaikwad, A. Abraham, N. Ahmed and S. M. Alhammad, Detecting extremism on twitter during US capitol riot using deep learning techniques. IEEE Access, 10 2022, 133052-133077.

B. Zhu, Y. Feng, D. Gong, S. Jiang, L. Zhao and N. Cui, Hybrid particle swarm optimization with extreme learning machine for daily reference evapotranspiration prediction from limited climatic data, Computers and Electronics in Agriculture, 173, 2020, 105430-105442.

A. Sagheer and M. Kotb, Unsupervised pre-training of a deep LSTM-based stacked autoencoder for multivariate time series forecasting problems, Scientific Reports, 9, 2019, 19038.

K. E. ArunKumar, D. V. Kalaga, C. M. S. Kumar, M. Kawaji and T. M. Brenza, Comparative analysis of gated recurrent units (GRU), long Short-Term memory (LSTM) cells, autoregressive Integrated moving average (ARIMA), seasonal autoregressive Integrated moving average (SARIMA) for forecasting COVID-19 trends, Alexandria Engineering Journal, 61, 2022, 7585-7603.

B. Akay, D. Karaboga and R. Akay, A comprehensive survey on optimizing deep learning models by metaheuristics, Artificial Intelligence Review, 55, 2022, 1-66.


  • There are currently no refbacks.