Next Article in Journal
A Multivariate Approach for Spatiotemporal Mobile Data Traffic Prediction
Previous Article in Journal
Hybrid K-Mean Clustering and Markov Chain for Mobile Network Accessibility and Retainability Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

An Application of Neural Networks to Predict COVID-19 Cases in Italy †

Department of Economic Studies, School of Economic, Business, Legal and Sociological Sciences, Università degli Studi “G. d’Annunzio”, 65127 Pescara, Italy
*
Author to whom correspondence should be addressed.
Presented at the 8th International Conference on Time Series and Forecasting, Gran Canaria, Spain, 27–30 June 2022.
Eng. Proc. 2022, 18(1), 11; https://doi.org/10.3390/engproc2022018011
Published: 21 June 2022
(This article belongs to the Proceedings of The 8th International Conference on Time Series and Forecasting)

Abstract

:
COVID-19 pandemic has become the greatest worldwide threat, as it has spread rapidly among individuals in most countries around the world. This study concerns the problem of weekly prediction of new COVID-19 cases in Italy, aiming to find the best predictive model for daily infection number in countries with a large number of confirmed cases. We compare the forecasting performance of linear and nonlinear forecasting models using weekly COVID-19 data for the period between 24 February 2020 until 16 May 2022. We discuss various forecasting approaches, including a Nonlinear Autoregressive Neural Network (NARNN) model, an Autoregressive Integrated Moving Average (ARIMA) model, a TBATS model, and Exponential Smoothing on the collected data and compared their accuracy using the data collected from 23 March 2020 to 20 April 2020, choosing the model with the lowest Mean Absolute Percentage Error (MAPE) value. Since the linear models seem to not easily follow the nonlinear patterns of daily confirmed COVID-19 cases, Artificial Neural Network (ANN) have been successfully applied to solve problems of forecasting nonlinear models. The model has been used for weekly prediction of COVID-19 cases for the next 4 weeks without any additional intervention. The prediction model can be applied to other countries struggling with the COVID-19 pandemic, to any possible future pandemics, and also help make better decisions in future.

1. Introduction

The World Health Organization has recognized the COVID-19 virus as a global threat, declaring it a universal epidemic. Predicting COVID-19 infections’ future trend is very important, as it has been having a significant worldwide negative impact on economics, medicine, finance, life expectancy, etc. The chance of having data in advance on its spread may enhance public health decision-making, allowing countries to avoid possible future crises by better allocating health resources.
Different forecasting models have been proposed for predicting the global or local spread of the pandemic, since 2020.
In our work, we provide forecasts for the confirmed Italian regions’ new COVID-19 cases, using linear and nonlinear time series forecasting models and comparing their accuracy to analyze their advancement based on the daily reported data. Our aim is to forecast new confirmed COVID-19 cases through a comparison of the performance of these models, with the aim to have clear expectations of future new cases.
The purpose of our work is to determine the best COVID-19 new cases forecasting model.
Several studies try to predict the evolution of the COVID-19 pandemic. Batista [1] predicted the number of cases in China, South Korea, and the rest of the world during the first semester of 2020 using a logistic model. Safi and Sanusi [2] applied an ARIMA model on data collected during the first and second pandemic wave. Khan and Gupta [3] chose an ARIMA (1,1,0) model for predicting Indian COVID-19 infection cases considering data that followed a linear trend. Abotaleb and Makarovskikh [4] proposed a combined ARIMA, Exponential Smoothing, BATS, and TBATS hybrid model for data collected until March 2021 in Russia. Gecili et al. [5] proposed an ARIMA model for American and Italian data collected from February 2020 until April 2020. Salaheldin and Abotaleb [6] chose the exponential growth model for daily COVID-19 forecasting in China, Italy, and USA.
In this paper, we aim to choose the best model among the most known time series forecasting models. Since the COVID-19 new-cases curve follows a nonlinear trend and considering that we have collected more recent pandemic data, this work emphasizes the importance of using nonlinear methods for modeling these time series, as classical linear models would not be able to identify the traits of nonlinear time series and, subsequently, would not give reliable predicted values. We have considered data from the beginning of the spread of the pandemic in Italy (24 February 2020) to 16 May 2022 in the Italian regions, months which were thought, according to previous proposed forecasting models, would correspond to quiet months from the point of the spread of the pandemic.

2. Materials and Methods

In this work, we considered data published online from Superior Health Institute on Epidemiology for Public Health related to COVID-19 infection cases in Italian regions for the period between 24 February 2020 and 16 May 2022 considering:
new daily regional infections from 24 February 2020 to 16 May 2022;
the last 8 days for testing daily cases (11 May 2022 to 16 May 2022);
the last 30 days for testing the forecasting accuracy of the third wave.
The forecasting was conducted through the R package “forecasting”, which provides methods and tools for forecasting univariate time series. We implemented an ARIMA model, a NNAR model, as well as a TBATS and Holt’s linear model, and chose the best model considering the Mean Average Percentage Error (MAPE) for each of them as follows:
MAPE = 1 n t = 1 n | A t F t A t |
where, n is the total number of observations, At is the actual value at time t, and Ft is the forecast value at time t.

2.1. ARIMA Model

The first model is ARIMA (Auto-Regressive Integrated Moving Average), which is the most common linear model for time series forecasting. It represents a time series as a function of its past values, its own lags, and the lagged errors, to forecast future values. An ARIMA model is compound by three terms: p, d, q:
y t = φ 0 + φ 1 y t 1 + φ 2 y t 2 + + φ p y t p + ε t + θ 1 ε t 1 + θ 2 ε t 2 + + θ p ε t q
where, p is the order of the Auto-Regressive (AR) term and refers to the number of y lags, which should be used as predictors; q is the order of the Moving Average (MA) term and it refers to the number of lagged errors used as predictors; while d is the number of differentiating required to make the time series stationary.
Although ARIMA is widely used for time series analysis, it is not easy to choose appropriate orders for its components, so we proceeded to determine them automatically, using the auto.arima function to obtain the best ARIMA model for each region (Table 1).
The model estimation concerns the use of statistical techniques to derive the coefficients that better fit the chosen ARIMA model. Once the model was identified and the parameters were estimated, it was used for forecasting. It is checked using statistical tests and residual plots that can be used to analyze the suitability of various models to historical data.

2.2. TBATS Model

The TBATS (Trigonometric Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend, and Seasonal component) model uses a combination of Fourier terms with an exponential smoothing state space model and a Box-Cox transformation, in an automated manner. The unit of time used in modeling was day.

2.3. Holt’s Linear Trend

This model includes a prediction equation and two smoothing equations. It uses double exponential smoothing parameters to forecast future values: The first parameter is used for the overall smoothing, while the other for the trend smoothing equation. We obtained the current value considering the adjusted last smoothed value for the last period’s trend and updated the trend over time, expressing it as the difference between the last two smoothed values.
Holt’s forecast equation:
y ^ t + h | t = l t + hb t
where
l t = α y t + ( 1 α ) ( l t 1 + b t 1 )
indicates the first equation (level equation), while
b t = β ( l t l t 1 ) + ( 1 β ) b t 1
indicates the trend equation, where:
0 ≤ α ≤ 1 is the smoothing parameter for the trend, 0 ≤ β ≤ 1; lt indicates the time series value at time t; bt is the time series trend at time t.

2.4. ANN Model

Artificial Neural Networks forecasting models are nonlinear models inspired by biological neural networks that identify and model nonlinear relationships between the variables. They are compounds of a collection of neurons, grouped in input, hidden, and output layers, and map a set of inputs into a set of output variables, through hidden layers of neurons. Their ability to learn from a training procedure and previous examples makes them a powerful forecasting tool. They have the ability to analyze new data based on previous results.
An ANN is composed of several layers:
The first layer, known as the input layer, is the one that takes the data in input.
The last layer, called the output layer, gives the results of the analysis or the solution to the problem.
The hidden layers, through which data flows from the input layer to the output. This is where the data is analyzed and the outputs are taken. The nodes of the hidden layers detect the features in the pattern of the data and the relationships between them. Then, the requested output is sent from the hidden layer to the output layer.
In our study, the NAR network was developed using the “nnetar” function of R software “caret” package that fits a neural network model to a time series [7] developed by Hyndman, O’Hara, and Wang. A NNAR (p,k), where p indicates the number of non-seasonal lags used as inputs and k the number of nodes in the hidden layer, can be described as an AR process with nonlinear functions. Considering the traits of the new COVID-19 cases trend for Italian regions, we chose a (28-5-1) network, with 28 lags as input nodes and 1 hidden layer with 5 nodes. It has the form of a feedforward three-layer ANN, where neurons have a one-way connection with the neurons of the next layers. The data set was divided into training set (70%) and testing set (15%), while the last 8 days data were used for the validation.
The forecasting performance of all these models was evaluated using the Mean Absolute Percentage Error (MAPE), while the model fits were evaluated using AIC (Akaike Information Criterion), reported in Table 2.

3. Results

Selection and accuracy measures for the forecasting models are reported in Table 2. MAPE was used to measure the performance of the models. We chose the best forecasting model according to the MAPE value, as it is recommended as an accuracy comparing unit when using different methods on a time series, considering as the most accurate model the one with the lowest MAPE value.
In addition to the graph, where it can be clearly seen, the above values of the table show that the ANN model has given more accurate forecasting values than the other linear forecasting models, for every region. According to MAPE, ANN improved the forecasting accuracy compared with ARIMA, TBATS, and Holt’s.
The NARNN model gives better results in almost all the considered regions, with a considerable difference from the indicators of the other models. ANN model has the lowest MAPE for the considered period for all the regions, improving the forecasting performance up to 36.47%, considering Campania. TBATS model has the highest MAPE values for the considered period, indicating that it cannot appropriately follow our data’s traits.
In Table 3 we present the MAPE value for the last 6 days data, considered as testing data. Once again, we can observe that the ANN model is the best for forecasting COVID-19 new cases in Italian regions. This fact confirms once again our assumption about choosing the best model for our time series, considering the nonlinear trend our data follow.
We performed the forecasting for new COVID-19 cases in Italian regions using the above models. We conducted a 30-days-ahead forecast (until 16 June 2022) and compared the forecasting data with the testing data for 6 days ( 11 May 2022–16 May 2022), applying the forecasting models to the confirmed cases for the last 8 days data and compared the results with the actual COVID-19 data. We calculated the MAPE values as the difference between actual data and forecast values. The MAPE values for ANN forecasting model are represented in Table 3. Based on our analysis, we concluded that the prediction performance of the models was similar to the real data. In particular, the ANN model gave more accurate predictions, as its MAPE values were lower compared to the other models. We observed decreasing MAPE values, in particular for the last 6 days' testing values, as its values decreased from about 7% to 1%. Higher MAPE values were observed for the other predictive models. ARIMA had a worse predicting performance for the first 3 days and the last day, while TBATS was the worst forecasting model when comparing the 6 days’ training data MAPE values.
Figure 1 presents the forecasting results of ANN model for the following 30 days for COVID-19 new confirmed cases in Italian regions. The NARNN model values follow very well the time series’ trend thanks to the training process, which enables the model to better understand the time series’ features. Once trained, the ANN decides itself on the importance of the variables, as it keeps learning continuously, performing quite well with unfamiliar data, thanks to its ability to work with multiple parallel inputs, as well as nonlinearity and plasticity in finding the most suitable model for time-series forecasting [8].
Figure 1 shows the trend of the number of new cases predicted by the ANN model for each region, obtained considering 28 lags as inputs and 5 nodes in the hidden layer. From the results obtained by the predictions of NARNN model, we can say that this model’s predictions of the new COVID-19 confirmed cases are closer to the observed time series values. This is also emphasized by the value of MAPE for the test set, which is much lower than other forecasting models’ MAPE values. According to the ANN (28-5-1) model, there will be an increasing trend in the number of new COVID-19 infections by the end of May, until 16 June in the following regions: Abruzzo, Basilicata, Calabria, Lazio, Liguria, Molise, Piemonte, Trentino Alto-Adige, and Veneto, while for the rest of them the ANN model predicted a constant to decreasing trend for the next 30 days.

4. Discussion

In this work, we evaluated four different time series forecasting models for predicting daily Italian regions’ COVID-19 confirmed new cases. Using various models let us compare their forecasting accuracy and make an optimal selection. For our time series, the ANN model was preferred over the other linear forecasting models. It was chosen based on MAPE value, as it had the lowest value among all the forecasting models. The ANN (28-5) model gives better results in all the considered indicators with a considerable difference from the indicators of the other linear models. It predicted an increase in the number of new COVID-19 infections by the end of May 2022, in almost all the Italian regions. The results are valid for a short period of time because in the long run they can be influenced by other factors such as vaccination, immunization of the population, and measures taken by government authorities to limit the spread of the infection, etc.
The above-considered models can be implemented on new data as they become available for possible future COVID-19 new confirmed cases forecasting, in order to improve forecasting accuracy, maybe taking into consideration other patients’ parameters as possible inputs for the ANN model, since additional data would improve forecasting performance. Predictions about possible future new cases would be very helpful for the allocation of medical resources, handling the spread of the pandemic, and getting more prepared in terms of health care systems. People that deal with decision-making could find it very helpful for future projections regarding intervention for reducing and controlling the spread of the infection.

Author Contributions

Conceptualization, E.N. and L.S.; methodology, E.N.; software, L.S.; validation E.N.; formal analysis, E.N. and L.S.; investigation, L.S.; resources, L.S.; data curation, E.N.; writing—original draft preparation, L.S.; writing—review and editing, E.N.; visualization, E.N.; supervision, E.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are available at: https://www.iss.it/ (accessed on 5 May 2022).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Batista, M. Estimation of the final size of the COVID-19 epidemic. MedRxiv, 2020; Preprint. [Google Scholar] [CrossRef] [Green Version]
  2. Safi, S.K.; Sanusi, O.I. A hybrid of artificial neural network, exponential smoothing, and ARIMA models for COVID-19 time series forecasting. Model Assist. Stat. Appl. 2021, 16, 25–35. [Google Scholar] [CrossRef]
  3. Khan, F.M.; Gupta, R. ARIMA and NAR based prediction model for time series analysis of COVID-19 cases in India. J. Saf. Sci. Resil. 2020, 1, 12–18. [Google Scholar] [CrossRef]
  4. Abotaleb, M.; Makarovskikh, T. System for Forecasting COVID-19 Cases Using Time-Series and Neural Networks Models. Eng. Proc. 2021, 5, 46. [Google Scholar] [CrossRef]
  5. Gecili, E.; Ziady, A.; Szczesniak, R.D. Forecasting COVID-19 confirmed cases, deaths and recoveries: Revisiting established time series modeling through novel applications for the USA and Italy. PLoS ONE 2021, 16, e0244173. [Google Scholar] [CrossRef] [PubMed]
  6. Abotaleb, M.S.A. Predicting COVID-19 Cases using Some Statistical Models: An Application to the Cases Reported in China Italy and USA. Acad. J. Appl. Math. Sci. 2020, 6, 32–40. [Google Scholar] [CrossRef]
  7. Reilly, D.L.; Cooper, L.N. An overview of Neural Networks: Early models to real world systems. In How We Learn; How We Remember: Toward an Understanding of Brain and Neural Systems; World Scientific Series in 20th Century Physics; World Scientific Publishers: Singapore, 1990; Volume 10, pp. 300–321. [Google Scholar] [CrossRef]
  8. Zhang, G.; Patuwo, B.E.; Hu, M.Y. Forecasting with artificial neural networks:: The state of the art. Int. J. Forecast. 1998, 14, 35–62. [Google Scholar] [CrossRef]
Figure 1. Daily COVID-19 Italian regions’ new cases prediction with ANN model: (a) Abruzzo; (b) Basilicata; (c) Calabria; (d) Emilia-Romagna,(e) Lazio; (f) Liguria; (g) Lombardia; (h) Marche; (i) Molise; (j) Campania; (k) Piemonte; (l) Puglia; (m) Sardegna; (n) Friuli-Venezia Giulia; (o) Sicilia; (p) Toscana; (q)Trentino Alto-Adige; (r) Umbria; (s) Valle D’Aosta; (t) Veneto.
Figure 1. Daily COVID-19 Italian regions’ new cases prediction with ANN model: (a) Abruzzo; (b) Basilicata; (c) Calabria; (d) Emilia-Romagna,(e) Lazio; (f) Liguria; (g) Lombardia; (h) Marche; (i) Molise; (j) Campania; (k) Piemonte; (l) Puglia; (m) Sardegna; (n) Friuli-Venezia Giulia; (o) Sicilia; (p) Toscana; (q)Trentino Alto-Adige; (r) Umbria; (s) Valle D’Aosta; (t) Veneto.
Engproc 18 00011 g001aEngproc 18 00011 g001b
Table 1. The chosen ARIMA model for each region.
Table 1. The chosen ARIMA model for each region.
RegionARIMA
AbruzzoARIMA (3,1,2)
BasilicataARIMA (0,1,5)
CalabriaARIMA (3,1,2)
CampaniaARIMA (0,1,5)
Emilia-RomagnaARIMA (2,1,3)
Fiuli-Venezia GiuliaARIMA (2,1,3)
LazioARIMA (0,1,5)
LiguriaARIMA (5,0,0)
LombardiaARIMA (0,1,5)
MarcheARIMA (0,1,5)
MoliseARIMA (2,1,3)
PiemonteARIMA (0,1,5)
PugliaARIMA (3,1,2)
SardegnaARIMA (2,1,3)
SiciliaARIMA (0,1,5)
ToscanaARIMA (2,1,3)
Trentino Alto-AdigeARIMA (3,1,2)
UmbriaARIMA (0,1,5)
Valle D’AostaARIMA (3,1,2)
VenetoARIMA (2,1,3)
Table 2. MAPE (%) for forecasting models’ accuracy.
Table 2. MAPE (%) for forecasting models’ accuracy.
RegionARIMATBATSHolt’sANN
Abruzzo47.0765.6858.6814.56
Basilicata45.1360.0271.2412.28
Calabria40.2354.1046.5328.07
Campania62.1169.3655.8125.64
Emilia-Romagna39.6250.0849.3134.15
Fiuli-Venezia Giulia29.5644.3740.6520.18
Lazio33.8543.7853.1224.52
Liguria39.4152.4444.1822.46
Lombardia47.5465.1346.2432.14
Marche44.2541.2851.2313.54
Molise40.6844.7650.0411.37
Piemonte38.7260.8165.1330.16
Puglia33.1547.8544.3226.45
Sardegna39.8744.6549.1627.09
Sicilia22.4542.1145.0220.33
Toscana24.0347.1660.8724.18
Trentino Alto-Adige25.3952.6455.7127.89
Umbria20.4854.5454.3918.52
Valle D’Aosta32.1853.0747.8519.15
Veneto33.3048.7950.6920.05
Table 3. MAPE (%) for 6 days’ accuracy of ANN forecasting model for Italian regions.
Table 3. MAPE (%) for 6 days’ accuracy of ANN forecasting model for Italian regions.
Region11 MAY 202212 MAY 202213 MAY 202214 MAY 202215 MAY 202216 MAY 2022
Abruzzo13.5414.4210.2812.9613.0812.84
Basilicata12.5210.8512.2713.6311.0512.71
Calabria25.3224.1216.0522.4115.3320.82
Campania23.4518.9617.0521.2126.8420.36
Emilia-Romagna28.9732.1230.543329.0631.80
Fiuli-Venezia Giulia20.4517.3319.5617.8419.0721.32
Lazio21.4622.3027.1819.3620.0822.18
Liguria20.9721.5419.7521.1316.3319.54
Lombardia31.8430.4632.5628.7231.8832.99
Marche12.7214.5616.2215.0213.2111.88
Molise10.7611.6412.1210.9812.5410.35
Piemonte28.1225.1222.3120.6429.2231.60
Puglia23.4021.4420.1625.3922.4824.56
Sardegna21.3917.9617.7523.4124.8420.36
Sicilia22.8321.7820.0521.4426.4522.02
Toscana22.1818.5619.3421.1220.8820.52
Trentino Alto-Adige26.5923.1716.7524.3115.4220.78
Umbria18.5221.5616.4519.0223.2120.82
Valle D’Aosta19.1517.3326.0215.2513.5415.65
Veneto20.0524.0626.6918.4318.2817.98
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Saliaj, L.; Nissi, E. An Application of Neural Networks to Predict COVID-19 Cases in Italy. Eng. Proc. 2022, 18, 11. https://doi.org/10.3390/engproc2022018011

AMA Style

Saliaj L, Nissi E. An Application of Neural Networks to Predict COVID-19 Cases in Italy. Engineering Proceedings. 2022; 18(1):11. https://doi.org/10.3390/engproc2022018011

Chicago/Turabian Style

Saliaj, Lorena, and Eugenia Nissi. 2022. "An Application of Neural Networks to Predict COVID-19 Cases in Italy" Engineering Proceedings 18, no. 1: 11. https://doi.org/10.3390/engproc2022018011

Article Metrics

Back to TopTop