Have a personal or library account? Click to login
Statistical, machine learning, and deep learning models for COVID-19 forecasting in Kenya Cover

Statistical, machine learning, and deep learning models for COVID-19 forecasting in Kenya

Open Access
|Sep 2025

Figures & Tables

Figure 1

Architecture of the LSTM network. Source: From ref. [39].
Architecture of the LSTM network. Source: From ref. [39].

Figure 2

Architecture of the GRU. Source: From ref. [39].
Architecture of the GRU. Source: From ref. [39].

Figure 3

Time series plots of total cases, severe cases, critical cases, and total deaths. Source: Created by the authors.
Time series plots of total cases, severe cases, critical cases, and total deaths. Source: Created by the authors.

Figure 4

ACF and PACF for total cases, severe cases, critical cases, and total deaths. Source: Created by the authors.
ACF and PACF for total cases, severe cases, critical cases, and total deaths. Source: Created by the authors.

Figure 5

Prediction vs actual values for total cases, critical cases, severe cases, and total deaths datasets. Source: Created by the authors.
Prediction vs actual values for total cases, critical cases, severe cases, and total deaths datasets. Source: Created by the authors.

Figure 6

Bar plot of performance metrics (RMSE, MAE, MAPE, and 
                        
                           
                           
                              
                                 
                                    R
                                 
                                 
                                    2
                                 
                              
                           
                           {R}^{2}
                        
                     ) for six models ARIMA, SVR, RNN, LSTM, GRU, and RF across four COVID-19 datasets: total cases, critical cases, severe cases, and total deaths. Source: Created by the authors.
Bar plot of performance metrics (RMSE, MAE, MAPE, and R 2 {R}^{2} ) for six models ARIMA, SVR, RNN, LSTM, GRU, and RF across four COVID-19 datasets: total cases, critical cases, severe cases, and total deaths. Source: Created by the authors.

Figure 7

Scatterplot of observed vs predicted values for the total cases dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.
Scatterplot of observed vs predicted values for the total cases dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.

Figure 8

Scatterplot of observed vs predicted values for the critical cases dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.
Scatterplot of observed vs predicted values for the critical cases dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.

Figure 9

Scatterplot of observed vs predicted values for the Severe Cases dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.
Scatterplot of observed vs predicted values for the Severe Cases dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.

Figure 10

Scatterplot of observed vs predicted values for the total deaths dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.
Scatterplot of observed vs predicted values for the total deaths dataset. The RF model demonstrates a strong linear relationship, indicating accurate predictions. Source: Created by the authors.

Figure 11

Boxplot of forecasting error distributions for six models – ARIMA, SVR, RNN, LSTM, GRU, and RF – across four COVID-19 datasets. Each model’s errors are grouped by dataset, with boxes showing the interquartile range, median, and outliers of the forecasting errors. The RF model consistently exhibits the lowest median error, minimal variance, and fewer outliers across all datasets, highlighting its superior predictive accuracy and stability. Source: Created by the authors.
Boxplot of forecasting error distributions for six models – ARIMA, SVR, RNN, LSTM, GRU, and RF – across four COVID-19 datasets. Each model’s errors are grouped by dataset, with boxes showing the interquartile range, median, and outliers of the forecasting errors. The RF model consistently exhibits the lowest median error, minimal variance, and fewer outliers across all datasets, highlighting its superior predictive accuracy and stability. Source: Created by the authors.

Figure 12

Heatmap of model performance metrics (RMSE, MAE, MAPE) across total cases, critical cases, severe cases, and total deaths datasets. All models show improvement over RF, with ARIMA exhibiting the highest improvement compared to RF. Source: Created by the authors.
Heatmap of model performance metrics (RMSE, MAE, MAPE) across total cases, critical cases, severe cases, and total deaths datasets. All models show improvement over RF, with ARIMA exhibiting the highest improvement compared to RF. Source: Created by the authors.

Performance metrics (RMSE, MAE, MAPE, and R 2 {R}^{2} ) for six models – ARIMA, SVR, RNN, LSTM, GRU, and RF – across four datasets: total cases, critical cases, severe cases, and total deaths

DatasetModelRMSEMAEMAPE (%) R 2 {R}^{2}
Total casesARIMA13870.677010916.635782.0056 9.2272 -9.2272
SVR5589.68113874.575826.4893 0.6609 -0.6609
RNN365.3872289.71082.32290.9929
LSTM338.4482281.72352.47400.9939
GRU215.3505177.09981.54490.9975
RF 93.4117 35.9370 0.2668 0.9995
Critical casesARIMA2055.30091599.767570.9180 6.7976 -6.7976
SVR467.2761216.06966.82700.5970
RNN62.515254.08352.86930.9928
LSTM185.1695144.15156.62110.9367
GRU42.591335.12511.89990.9967
RF 17.5342 7.3318 0.3330 0.9994
Severe casesARIMA6593.21695188.959581.8556 9.1904 -9.1904
SVR2223.51931341.995617.5188 0.1590 -0.1590
RNN140. 1730110.00142.37960.9954
LSTM281.8612221.96383.93550.9814
GRU140.4860113.28041.95070.9954
RF 44.4818 17.1128 0.2668 0.9995
Total deathsARIMA822.0758639.871270.9140 6.7967 -6.7967
SVR89.164634.30852.63810.9083
RNN23.344517.92252.09400.9937
LSTM40.458331.61184.03410.9811
GRU21.333718.60392.56570.9947
RF 7.0137 2.9327 0.3330 0.9994

Parameter settings for RNN, LSTM, and GRU models

ParameterRNNLSTMGRU
Number of layers333
ActivationReLUReLUReLU
Loss functionMSEMSEMSE
OptimizerAdamAdamAdam
Learning rate0.0010.0010.001
Dropout rate0.20.20.2
Epochs100100100
Batch size161616
Units per layer100, 50, 25100, 50, 25100, 50, 25
Early stoppingYes (monitor = val_loss, patience = 10)Yes (monitor = val_loss, patience = 10)Yes (monitor = val_loss, patience = 10)

ADF test results for stationarity

VariableADF statistic p p -value
Total cases 1.6906 -1.6906 0.4360
Severe cases 1.6906 -1.6906 0.4360
Critical cases 1.6968 -1.6968 0.4327
Total deaths 1.6968 -1.6968 0.4328

DM test statistics comparing RF to benchmark models across datasets and loss functions

DatasetBenchmark modelMSEMAEMAPE
Total casesARIMA 8.381 3 * * * -8.381{3}^{* * * } 12.632 2 * * * -12.632{2}^{* * * } 14.587 6 * * * -14.587{6}^{* * * }
SVR 5.986 5 * * * -5.986{5}^{* * * } 9.517 9 * * * -9.517{9}^{* * * } 14.060 0 * * * -14.060{0}^{* * * }
RNN 7.478 2 * * * -7.478{2}^{* * * } 11.299 8 * * * -11.299{8}^{* * * } 13.647 8 * * * -13.647{8}^{* * * }
LSTM 7.713 3 * * * -7.713{3}^{* * * } 13.057 4 * * * -13.057{4}^{* * * } 14.500 8 * * * -14.500{8}^{* * * }
GRU 4.937 5 * * * -4.937{5}^{* * * } 9.653 0 * * * -9.653{0}^{* * * } 12.054 7 * * * -12.054{7}^{* * * }
Critical casesARIMA 8.196 2 * * * -8.196{2}^{* * * } 12.271 1 * * * -12.271{1}^{* * * } 16.908 7 * * * -16.908{7}^{* * * }
SVR 4.138 3 * * * -4.138{3}^{* * * } 5.092 6 * * * -5.092{6}^{* * * } 5.328 4 * * * -5.328{4}^{* * * }
RNN 8.906 4 * * * -8.906{4}^{* * * } 15.779 6 * * * -15.779{6}^{* * * } 17.316 7 * * * -17.316{7}^{* * * }
LSTM 7.806 8 * * * -7.806{8}^{* * * } 12.091 7 * * * -12.091{7}^{* * * } 17.446 0 * * * -17.446{0}^{* * * }
GRU 6.949 7 * * * -6.949{7}^{* * * } 10.959 0 * * * -10.959{0}^{* * * } 11.152 7 * * * -11.152{7}^{* * * }
Severe casesARIMA 8.380 6 * * * -8.380{6}^{* * * } 12.631 6 * * * -12.631{6}^{* * * } 14.564 6 * * * -14.564{6}^{* * * }
SVR 5.235 0 * * * -5.235{0}^{* * * } 7.475 3 * * * -7.475{3}^{* * * } 9.483 4 * * * -9.483{4}^{* * * }
RNN 5.296 3 * * * -5.296{3}^{* * * } 9.109 2 * * * -9.109{2}^{* * * } 9.459 2 * * * -9.459{2}^{* * * }
LSTM 7.056 2 * * * -7.056{2}^{* * * } 11.344 0 * * * -11.344{0}^{* * * } 13.424 1 * * * -13.424{1}^{* * * }
GRU 7.321 1 * * * -7.321{1}^{* * * } 11.440 3 * * * -11.440{3}^{* * * } 13.382 3 * * * -13.382{3}^{* * * }
Total deathsARIMA 8.196 2 * * * -8.196{2}^{* * * } 12.271 0 * * * -12.271{0}^{* * * } 13.478 9 * * * -13.478{9}^{* * * }
SVR 3.243 0 * * * -3.243{0}^{* * * } 3.969 7 * * * -3.969{7}^{* * * } 4.008 1 * * * -4.008{1}^{* * * }
RNN 7.122 7 * * * -7.122{7}^{* * * } 9.983 4 * * * -9.983{4}^{* * * } 11.479 3 * * * -11.479{3}^{* * * }
LSTM 6.444 3 * * * -6.444{3}^{* * * } 10.958 3 * * * -10.958{3}^{* * * } 14.155 8 * * * -14.155{8}^{* * * }
GRU 8.801 3 * * * -8.801{3}^{* * * } 13.753 9 * * * -13.753{9}^{* * * } 13.808 8 * * * -13.808{8}^{* * * }

Summary statistics

CountMeanStd DevMin25%50%75%MaxKurtosisSkewness
Total cases4998841.585911.12146.053737.578218.4912979.5121393.05 0.8752 -0.8752 0.4086
Severe cases4994210.272814.8269.551779.803913.576180.7210187.17 0.8752 -0.8752 0.4086
Critical cases4991472.06983.3525.06616.251359.012158.803570.59 0.8753 -0.8753 0.4116
Total deaths499588.83393.3410.03246.50543.60863.521428.24 0.8753 -0.8753 0.4116
Language: English
Submitted on: Apr 18, 2025
Accepted on: Jul 23, 2025
Published on: Sep 15, 2025
Published by: Sciendo
In partnership with: Paradigm Publishing Services

© 2025 Joyce Kiarie, Samuel Musili Mwalili, Rachel Mbogo, John Kamwele Mutinda, Amos Kipkorir Langat, published by Sciendo
This work is licensed under the Creative Commons Attribution 4.0 License.