Univariate and Multivariate Long Short Term Memory (LSTM) Model to Predict Covid-19 Cases in Malaysia Using Integrated Meteorological Data


  • Ng Wei Shen Center for Artificial Intelligence Technology, Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, 43600 Bangi, Selangor Darul Ehsan, Malaysia
  • Azuraliza Abu Bakar Center for Artificial Intelligence Technology, Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, 43600 Bangi, Selangor Darul Ehsan, Malaysia
  • Hazura Mohamad Center for Artificial Intelligence Technology, Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, 43600 Bangi, Selangor Darul Ehsan, Malaysia




Long Short Term Memory, Univariate and multivariate model, Active covid-19 cases, meteorology


The rate of transmission of coronavirus disease (COVID-19) has been very fast since the first reported case in December 2019 in Wuhan, China. The disease has infected more than 3 million people worldwide and resulted in more than 224 thousand deaths as of May 1, 2020, reported by The World Health Organization (WHO). In the past, meteorological parameters such as temperature and humidity were essential and effective factors against serious infectious diseases such as influenza and Severe Acute Respiratory Syndrome (SARS). Therefore, exploring the relationship between meteorological factors and active COVID-19 cases is essential. This study employs the long-short term memory (LSTM) method to predict Covid-19 Cases in Malaysia. We propose a univariate and multivariate model using Covid-19 cases and meteorology data. The univariate LSTM model uses Covid-19 active cases data in a year as a control attribute for model development. The multivariate LSTM model uses the integrated Covid-19 cases, and meteorology data consists of attributes: minimum, maximum, and average values of Humidity, Temperature, Windspeed, and Pressure from 13 states of Malaysia. The model's performance is evaluated using errors such as MAE, RMSE, MAPE, and the R2 Score. The low errors and higher R2 score indicate the model's excellent performance. We observed that the univariate LSTM model gives the least error in five states, indicating that those states' daily active cases are the main contributing factors. In the multivariate LSTM model, the daily cases and humidity, temperature, and windspeed are the main factors in several different states. The result of the study is to help the government to prevent and manage the spread of the COVID-19 and other upcoming pandemic better.


Alsayed, A., Sadir, H., Kamil, R., Sari, H. (2020). Prediction of epidemic peak and infected cases for COVID-19 disease in Malaysia. Int J Environ Res Public Health. 17(11):1–15. https://www.mdpi.com/1660- 4601/17/11/4076.

Bakar, A., Aftar, M. Ariff, M. Nadzir, M. A. Shahrul, M., Aftar, M., Wen, Ong, Suris, Fatin Nur Afiqah. (2022). Prediction of multivariate air quality time series data using long short-term memory network. Malaysian Journal of Fundamental and Applied Sciences. 18, 52-59. 10.11113/mjfas.v18n1.2393.

Bashir, M. F., Ma, B., Bilal, Komal, B., Bashir, M. A., Tan, D., Bashir, M. (2020). Correlation between climate indicators and COVID-19 pandemic in New York, USA. The Science of the Total Environment, 728, 138835. https://doi.org/10.1016/j.scitotenv.2020.138835.

Bhimala, K. R., Patra, G. K., Mopuri, R., Mutheneni, S. R. Prediction of COVID-19 cases using the weather integrated deep learning approach for India. (2021). Transboundary and Emerging Diseases. 69(32022Pagesi- 927-1662. Doi: 10.1111/tbed.14102.

Bloom-Feshbach, K., Alonso, W. J., Charu, V., Tamerius, J., Simonsen, L., Miller, M. A., Viboud, C. (2013). Latitudinal variations in seasonal activity of influenza and respiratory syncytial virus (RSV): A global comparative review. PLoS ONE, 8(2), e54445. https://doi.org/10.1371/journal.pone.0054445.

Heidari, A., Jafari Navimipour, N., Unal, M. et al. (2022). Machine learning applications for COVID-19 outbreak management. Neural Comput & Applic., 34, 15313-15348. https://doi.org/10.1007/s00521-022-07424-w.

Jalaludin, J., Wan Mansor, W. N., Abidin, N. A., Suhaimi, N. F., Chao, H-R. (2023). The impact of air quality and meteorology on COVID-19 cases at Kuala Lumpur and Selangor, Malaysia and prediction using machine learning. Atmosphere, 14(6), 973. https://doi.org/10.3390/atmos14060973.

Kelleher, J. d., Namee, M. B. & D’Arcy, A. (2015). Fundamental of Machine Learning for Predictive Data Analytics. Algorithms, Worked Examples, and Case Studies. The MIT Press.

Leonenko, V. N., Bochenina, K. O., & Kesarev, S. A. (2017). Influenza peaks forecasting in Russia: Assessing the applicability of statistical methods. Procedia Computer Science, 108, 2363-2367. 10.1016/j.procs.2017.05.196.

Makama, E. K. and Lim, H. S. (2021). Effects of location-specific meteorological factors on COVID-19 daily infection in a tropical climate: A case of Kuala Lumpur, Malaysia. Hindawi Advances in Meteorology. https://doi.org/10.1155/2021/6675943.

Manu Rastogi. (2020). Tutorial on LSTMs: A Computational Perspective. https://towardsdatascience.com/tutorial-on-lstm-a-computational-perspective-f3417442c2cd#0d00.

Miguel-Hurtado, Oscar & Guest, Richard & Stevenage, Sarah & Neil, Greg & Black, Sue. (2016). Comparing machine learning classifiers and linear/logistic regression to explore the relationship between hand dimensions and demographic characteristics. PLoS ONE, 11, e0165521. 10.1371/journal.pone.0165521.

Mohan Viswanathan, P., Sabarathinam, C., Karuppannan, S. et al. (2022). Determination of vulnerable regions of SARS-CoV-2 in Malaysia using meteorology and air quality data. Environ Dev Sustain., 24, 8856-8882 (2022). https://doi.org/10.1007/s10668-021-01719-z.

Pal, M., Berhanu, G., Desalegn, C., & Kandi, V. (2020). Severe acute respiratory syndrome Coronavirus-2 (SARS-CoV-2). https://doi.org/10.7759/cureus.7423.

Prata, D. N., Rodrigues, W., Bermejo, P. H. (2020). Temperature significantly changes COVID-19 transmission in (sub)tropical cities of Brazil. Sci Total Environ., 729, 138862. Doi: 10.1016/j.scitotenv.2020.138862.

Rashed, E. A. & Hirata, A. (2021). One-year lesson: Machine learning prediction of COVID-19 positive cases with meteorological data and mobility estimate in japan. Int. J. Environ. Res. Public Health, 18, 5736. https://doi.org/10.3390/ ijerph18115736.

Rastogi, M. (2020). Tutorial on LSTMs: A Computational Perspective. https://towardsdatascience.com/tutorial-on-lstm-a-computational-perspective-f3417442c2cd#0d00.

Rendana, M & Idris, W. M. R. (2021). New COVID-19 variant (B.1.1.7). Forecasting the occasion of virus and the related meteorological factors, Journal of Infection and Public Health, 14, 1320-1327. https://doi.org/10.1016/j.jiph.2021.05.019.

Rustam, F., Reshi, A. A., Mehmood, A., Ullah, S., On B. W., Aslam, W., et al. (2020). COVID-19 future forecasting using supervised machine learning models. IEEE Access, 8, 101489-99. https://ieeexplore.ieee.org/abstract/ document/9099302.

Shrivastav, L. K., Jha, S. K. (2021). A gradient boosting machine learning approach in modeling the impact of temperature and humidity on the transmission rate of COVID-19 in India. Applied Intelligence, 51, 2727-2739. https://doi.org/10.1007/s10489-020-01997-6.

Suhaimi, N. F., Jalaludin, J., Latif, M. T. (2020). Demystifying a possible relationship between COVID-19, air quality and meteorological factors: Evidence from Kuala Lumpur, Malaysia. Special Issue on COVID-19 Aerosol Drivers, Impacts and Mitigation (III) Aerosol and Air Quality Research, 20, 1520-1529.

Talib, D., Dimitris, D., (2020). Weather impact on airborne coronavirus survival. Physics of Fluids, 32(9), 093312. https://doi.org/10.1063/5.0024272.

Valsamatzi-Panagiotou, A., Penchovsky, R. (2021). Environmental factors influencing the transmission of the coronavirus 2019: A review. Environ Chem Lett., 20, 1603-1610. https://doi.org/10.1007/s10311-022-01418-91.

World Health Organization. (2020). Modes of transmission of virus causing COVID-19: Implications for IPC precaution recommendations. https://www.who.int/news-room/commentaries/detail/modes-of-transmission-of-virus-causing-covid-19-implications-for-ipc-precaution-recommendations.