NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Forecasting COVID-19 cases using Machine Learning models

Yuan Tian, Ishika Luthra, Xi ZhangmedRxiv 2020

Abstract

As of April 26, 2020, more than 2,994,958 cases of COVID-19 infection have been confirmed globally, raising a challenging public health issue. A predictive model of the disease would help allocate medical resources and determine social distancing measures more efficiently. In this paper, we gathered case data from Jan 22, 2020 to April 14 for 6 countries to compare different models’ proficiency in COVID-19 cases prediction. We assessed the performance of 3 machine learning models including hidden Markov chain model (HMM), hierarchical Bayes model, and long-short-term-memory model (LSTM) using the root-mean-square error (RMSE). The LSTM model had the consistently smallest prediction error rates for tracking the dynamics of incidents cases in 4 countries. In contrast, hierarchical Bayes model provided the most realistic prediction with the capability of identifying a plateau point in the incidents growth curve.

Introduction

Early in the COVID-19 pandemic, healthcare systems faced a critical need for accurate forecasting to allocate medical resources and time social distancing measures. Traditional epidemiological models, like the SEIR (Susceptible-Exposed-Infected-Resistant) framework, rely on rigid biological assumptions that may not hold true for a novel virus. This study investigates whether data-driven machine learning models can overcome the challenges of "novel, sparse, and noisy" data to predict confirmed infection counts five days into the future without relying on heavy biological biases.

Methodology

The researchers compared three distinct mathematical philosophies:

  1. Hidden Markov Model (HMM): A statistical model representing systems with "hidden" states, here representing underlying stages of viral spread.
  2. Hierarchical Bayes Model: Uses a generalized logistic function to model growth. By sharing information across countries via hyperpriors, "data-rich" countries inform predictions for "data-poor" ones.
  3. Long Short-Term Memory (LSTM): A "naive" Recurrent Neural Network (RNN) designed for time-series data. It makes no prior assumptions about data distribution. To improve robustness, it was trained on daily case changes (deltas) with added Gaussian noise to prevent overfitting.

Data and Preprocessing

The study utilized the Johns Hopkins University COVID-19 GitHub repository, covering 84 days of data (January 22 to April 14, 2020). While data for 173 countries was available, the focus was on six: South Korea, Italy, the United States, Taiwan, Japan, and Germany. Case counts were normalized per million of the population to allow for fair cross-country comparisons and prevent numerical underflow.

Key Insights: Tracking Dynamics vs. Identifying Plateaus

A major finding was the trade-off between tracking volatile dynamics and identifying long-term trends. The LSTM's lack of prior assumptions allowed it to track the initial outbreak's volatile dynamics effectively. Conversely, the Hierarchical Bayes model was more "realistic" in its ability to mathematically account for a plateau—the point where infection rates level off.

Figure 6: Infection trend in Italy, illustrating the model's performance as the growth curve begins to stabilize.

The Hierarchical Bayes model successfully relaxed the "IID" (Independent and Identically Distributed) assumption, learning the general pandemic "shape" from one region and applying it to another. Training the LSTM on daily deltas was also crucial, forcing it to model the actual velocity of spread rather than simple auto-correlation.

Results

Models were evaluated using Root-Mean-Square Error (RMSE) for a 5-day prediction window.

Figure 2: Comparison of real infection trends versus average predictions across six countries.
  • LSTM: The overall winner in raw accuracy (Average RMSE: 63.88), performing best in the US, Taiwan, Japan, and South Korea.
  • Hierarchical Bayes: Followed with an average RMSE of 92.10, notably outperforming the LSTM in Italy and Germany where curves began to stabilize.
  • HMM: Performed significantly worse (Average RMSE: 188.96) due to sensitivity to initialization and early stochastic noise.

Conclusion and Future Work

The study highlights that while LSTMs excel at short-term precision during rapid growth, Hierarchical Bayes models offer better structural realism for identifying plateaus. Future work should explore ensemble methods—averaging LSTM and Hierarchical Bayes results—to provide more robust tools for public health planning. Limitations include the short 5-day forecasting window and the exclusion of external covariates like population density or lockdown measures.

Summary updated

BibTeX
@misc{tian2020forecasting,
  author = {Yuan Tian and Ishika Luthra and Xi Zhang},
  title = {{Forecasting COVID-19 cases using Machine Learning models}},
  year = {2020},
  doi = {10.1101/2020.07.02.20145474},
  howpublished = {medRxiv},
}
Figure