In this paper, a multi-layer gated recurrent unit neural network
(multi-head GRU) model is proposed to predict the confirmed cases of the
new crown epidemic (COVID-19). We extract the time series relationship in
the data, and the rolling prediction method is adopted to ensure the simple
structure of the model and achieve higher precision and interpretability. The
prediction results of this model are compared with the LSTM model, the
Transformer model and the infectious disease model (SIR). The results show
that the proposed model has higher prediction accuracy. The mean absolute
error (MAE) of epidemic prediction in most countries (the United States,
Brazil, India, the United Kingdom and Russia) is respectively 197.52, 68.02,
200.67, 24.78 and 123.50, which is much smaller than the prediction error
of the SIR model, LSTM model and Transformer model. For the spread of
the COVID-19 epidemic, traditional infectious disease models and machine
learning models cannot achieve more accurate predictions. In this paper, we
use a GRU model to predict the real-time spread of COVID-19, which has
fewer parameters so that it can reduce the risk of overfitting to train faster.
Meanwhile, it can compensate for the transformer model’s shortcomings to
capture local features.