This presentation discusses using a Long Short Term Memory (LSTM) neural network model to predict global COVID-19 cases. It provides background on COVID-19 and reviews literature applying machine learning to predict disease spread. The methodology collects real-time case data, performs exploratory analysis, and trains an LSTM on 90% of normalized data. The model predicts daily cases for the held-out 10% and is evaluated on root mean square error. While the deep learning model captures some patterns, predictions are difficult given the pandemic's volatility. Social distancing remains important for health.
Presiding Officer Training module 2024 lok sabha elections
Global COVID-19 cases prediction using LSTM
1. Presentation on
“Global COVID-19 cases prediction using
Long Short Term Memory”
Subash Chandra Pakhrin
PhD Student
Wichita State University
Wichita, Kansas
1
2. Introduction
• COVID-19 is an infectious disease caused by severe
acute respiratory syndrome coronavirus2 (SARS-COV-
2).
• The disease was first identified in December 2019 in
Wuhan.
• As of April 27 2020, more than 3 million cases have
been reported across 185 countries.
• More than 208,000 deaths and more than 878,000
recovery.
• Symptoms: fever, cough, fatigue, shortness of breath
and loss of smell.
2
4. COVID-19
• Flu virus travel inside a sac made from cell
membrane to our cell nucleus that has all genetic
material.
• Corona virus doesn’t enter the host cell nucleus. It
directly access Ribosome (Protein Factory).
• Polypeptide Chain made from Ribosome travels to
Golgi apparatus and combines with cell membrane
and eventually it reproduce corona virus.
• Sanche S, et al. [1] illustrated that within 6 – 7 days
number of patients affected with COVID – 19 doubles
and it has a degree of spread (R0) of 2.2 – 2.7.
4
5. Objective
• To predict the number of daily cases using variant of
Recurrent Neural Network: Long Short Term
Memory.
• Take preventive actions to limit the spread of
Pandemic or decrease the value of R0.
5
6. Literature Review
• Qiang Gao, et al. [2] has developed pilot-scale
production of a purified inactivated SARS-CoV-2 virus
vaccine candidate (PiCoVacc), and is tested in
macaques and is safe to be used for humans.
• Jiayu Qiu, et al. [3] used LSTM and an attention
mechanism, and established the prediction model of
a stock price.
6
7. Literature Review
• Dianbo Liu, et al., [4] have used machine-learning
methodologies, to reliably forecast COVID-19 activity
in Chinese provinces in real -time.
• Ratnabali Pal, et al. [5] have proposed a shallow Long
short-term memory (LSTM) based neural network to
predict the risk category of a country.
7
8. Literature Review
• Shawni Dutta, et al. [6] used machine learning
approach to evaluate how much predicted results are
close to Confirmed – Negative – Released - Death
cases of Covid-19
• Zifeng Yang, et al. [7] proposed modified susceptible
–exposed-infected-removed (SEIR) epidemiological
model to predict the epidemic progression.
8
9. Literature Review
• Zhiyong Cui, et al. [8] proposed a deep stacked
bidirectional and unidirectional LSTM neural network
architecture, to predict network-wide traffic speed.
• Sima Siami et al. [9] proposed BiLSTM-based model
which offers better predictions than regular LSTM-
based models. Surprisingly, They found BiLSTM
models provide better predictions compared to
ARIMA and LSTM models.
9
10. Methodology
• Real Time Data collected from JOHNS HOPKINS
BLOOMBERG SCHOOL of PUBLIC HEALTH
• Exploratory Data Analysis:
– Truncate the alphabet part of the dataset & Summing up the daily
cases
– Normalize the dataset
– Converting 2 dimensional (2D) dataset into 3D dataset
– Make sequential data
• Separate the data into train (90%) and test set (10%)
• Feeding the 3D data into Long Short Term Memory.
• Train the model.
• Predict the value from trained model.
• Evaluating the model. 10
11. Proposed framework
11
Data Collection
Exploratory Data Analysis (Truncating
alphabet features, Normalization,
conversion from 2D to 3D)
Train the LSTM Model (90% Training
Sample)
Test the model (10 % Test Sample),
predict the value from the model
Validate the model
Tune hyper
Parameters
Figure 2: Proposed Framework
12. Recurrent Neural Network for
Sequence Modeling
“This morning I took my dog for a _____.”
given these words predict the next word
“Nepal is where I grew up, but I now live in Wichita. I speak fluent ___.”
We need information from the distant past to accurately predict the correct word.
Figure 3: Neural network and RNN
13. Long Short Term Memory (LSTMs)
LSTMs networks rely on gated cell to track information throughout many
time steps.
LSTM modules contain computational blocks that control information flow
Information is added or removed through structures called gates
Figure 4: Cell of LSTM [10, 11, 12, 13]
14. Long Short Term Memory (LSTMs)
1) Forget 2) Store 3) Update 4) Output
LSTMs forget irrelevant parts of the previous
state
Figure 5: Forget gate of LSTM [10, 11, 12, 13]
15. Long Short Term Memory (LSTMs)
1) Forget 2) Store 3) Update 4) Output
LSTMs store relevant new information into the
cell state
Figure 6: Store gate of LSTM [10, 11, 12, 13]
16. Long Short Term Memory (LSTMs)
1)Forget 2) Store 3) Update 4) Output
LSTMs selectively update cell state values
Figure 7: Update gate of LSTM [10, 11, 12, 13]
17. Long Short Term Memory (LSTMs)
1)Forget 2) Store 3) Update 4) Output
The output gate controls what information is
sent to the next time step
Figure 8: Update gate of LSTM [10, 11, 12, 13]
19. Output: Cumulative Daily Cases
19
Figure 10: Cumulative Daily Corona Cases
As of April 22 there are more than 2,500,000 corona cases world wide.
20. Output: Daily Cases
20
Figure 11: Daily Corona Cases world wide
On April 10 there was around 95,000 confirmed corona cases world wide
21. No of epochs to train the model
21
As number of epochs increase the training and test loss gradually
decrease and eventually they become consistent at epoch 55
Figure 12: Training and Test loss w.r.t. no. of epochs
22. Output: Prediction vs. Real value
22
Figure 13: predicted and real values
Since COVID-19 is a pandemic its predictions is difficult and it has volatile
and mercurial pattern
23. Root Mean Square Error (RMSE)
23
• RMSE is the root of the mean of the squared error.
• It has same unit as Actual value.
• Varied from 15.99 to 4000
Real Value Predicted Value
70,880 88,531.305
Table 1: Real and Predicted Value
24. Conclusion
• The proposed model perceived some pattern from
the historical data points by remembering the
relevant facts and forgetting the irrelevant features.
• The deep learning requires huge amount of data to
be trained so the model has large RMSE.
• In order to remain safe, we should practice social
distancing.
24
26. References:
[1] Sanche S, Lin YT, et al., “High contagiousness and rapid spread of severe acute
respiratory syndrome coronavirus 2.”, Emerg Infect Dis. 2020 Jul.
https://doi.org/10.3201/eid2607.200282
[2] Qiang Gao, Linlin Bao, et al., “Rapid development of an inactivated vaccine for
SARS-CoV-2”, bioRxiv, 2020, https://doi.org/10.1101/2020.04.17.046375
[3] Jiayu Qiu, Bin Wang, et al., “Forecasting stock prices with long-short term
memory neural network based on attention mechanism”, Jan 2020, PLOS ONE,
https://doi.org/10.1371/journal.pone.0227222
[4] Dianbo Liu, Leonardo Clemente, et al., “A machine learning methodology for real-
time forecasting of the 2019-2020 COVID-19 outbreak using Internet searches,
news alerts, and estimates from mechanistic models”, arXiv.org stat, Apr 2020
[5] Ratnabali Pal, Arif A. Sekh, et al., “Neural Network based country wise risk
prediction of COVID-19”, IEEE, Mar 2020
[6] Shawni Dutta, et al. , “Machine Learning Approach for Confirmation of COVID-19
Cases: Positive, Negative, Death and Release”, medRxiv, Mar 2020,
https://doi.org/10.1101/2020.03.25.20043505
[7] Zifeng Yang, et al., “Modified SEIR and AI prediction of the epidemics trend of
COVID-19 in China under public health interventions”, Journal of Thoracic
Disease, Mar 2020, doi: 10.21037/jtd.2020.02.64
26
27. References:
[8] Zhiyong Cui, et al., “Stacked Bidirectional and Unidirectional LSTM Recurrent
Neural Network for Network-wide Traffic Speed Prediction
[9] Sima Siami, et al., “A comparative Analysis of Forecasting financial Time Series
using ARIMA, LSTM, and BiLSTM
[10]Sepp Hochreiter, Jürgen Schmidhuber et al., “LONG SHORT TERM MEMORY”,
Neural Computation, 1997
[11]Ava Soleimany, Recurrent Neural Networks, MIT Introduction to Deep Learning,
2020, 6. S191: https://youtu.be/SEnXr6v2ifU
[12]Lex Friedman, MIT 6.S094: Recurrent Neural Networks for Steering Through Time,
2017, https://youtu.be/nFTQ7kHQWtc
[13] Fei-Fei Li, Justin Johnson & Serena Young, Stanford University, Convolutional
Neural Networks for Visual Recognition, 2017,
https://youtu.be/6niqTuYFZLQ?list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv
27