Predicting active, death and recovery rates of COVID-19 in Al- geria using Facebook’ Prophet model

The coronavirus disease pandemic 2019 (COVID-19) has emerged in Wuhan province, China in December 2019 and has spread over all countries. The current study was carried out to predict active, death and cured rate of COVID 19 in Algeria for a future period of 35 days using FB prophet model. Results shoed that the active rate and the death rate decrease for the next days while the cured rate increase. The active, cured and death rates are estimated at 19.7% 78.85% and 2.55% respectively. These results highlight the importance of FB prophet model in COVID-19 prediction which could help national authorities in adopting the best preventive measures.


Introduction
COVID-19 is the most recent pandemic in the world which is caused by a new strain coronavirus called nCOV (novel coronavirus) or SARS-CoV-2 (Severe Acute Respiratory Syndrome coronavirus 2). This disease has emerged on December, 2019 in China, more exactly in the City of Wuhan located at the province of Hubei [1]. Since March 2020 and due to its fast spread in the world, the disease has been declared as a pandemic by the World Health Organization (WHO) [2]. One year later, as of 5th January 2021, globally, COVID-19 cases reached a number of 90 millions and the death toll rose to 2 millions persons; meanwhile, the recovered count increased to reach 1,206,27647 people [3]. Due to these characteristics and especially the fast spreading, the ongoing COVID-19 outbreak has presented a real challenge for model designers in understanding the epidemiological curves [1]. The number of cases, the number of deaths, the basic reproductive number, the inflection point, the end point, the doubling time and other epidemiological features still be under research and epidemiological models are of great importance in resolving these problems [4]. Their results could be helpful for political and health authorities in adapting their prevention strategies and estimate their medical needs (hospital beds, ventilators, masks, etc.) [5]. In this way, multiple researchers have proposed these last months a number of epidemiological, mathematical/statistical and artificial intelligence models to analyze, model and forecast the COVID-19 pandemic [6]. Machine learning and deep learning models have been widely applied in the prediction of epidemic evolution. These time series based models attempt to predict future trend of an epidemic using and analyzing historical data [7]. They are also adapted for the COVID-19 disease since the cases and deaths are daily recorded [8]. Among these models, Auto Regressive Integrated Moving Average (ARIMA), Long Short-Term Memory networks (LSTM) and Prophet are the most commonly used in forecasting epidemic diseases [5,8] They are widely used and accepted due to their more accurate forecasting capability. However Prophet is much faster and simpler to implement than ARIMA and LSTM models [9]. Prophet is a simple open-source tool developed by Facebook's Data Science team in 2017. This model which was originally used for business forecasting [10] [11] has been widely used in forecasting time series data in different domain such as cash flow [12], streamflow [13], air pollution [14], healthcare emergency department indicators [8], but also in forecasting epidemic diseases like the influenza epidemic [15] and seasonal flu [16] and other non infectious diseases like diabetes and obesity [17]. This model includes parameters like holidays, trend and seasonality which would help in moulding the prediction results and giving a better performance with time-series data that have seasonal effects and a good robustness in dealing with missing data [18,19]. Related works: Multiple scientific studies attempted to forecast the COVID-19 epidemic using the Prophet model. Some of these studies are presented below: Battineni et al, 2020 [19] proposed a forecasting method with the Prophet model for a 60 days forecasting of COVID-19 epidemic in the four most affected countries including the USA, Brazil, India and Russia. They reported that, the estimated number of cases by late September can reach 1.22, 3.01, 4.65 and 7.56 millions in Russia, India, Brazil and the USA, respectively. Tulshyan et al, 2020 [9] used Prophet model to predict the COVID-19 cases during and after lockdown relaxation and to predict the total deaths in India using data from March 24 2020 to May 24 2020. This study shows that the prediction accuracy was estimated at 87% in the lockdown period and has decreased in the lockdown relaxation period to record a rate of 60%. Ndiaye et al, 2020 [20] used Prophet model to predict the number of cases in Senegal for 10 future days using data using reported data of three months. The authors estimated the number of cases at more than 5700 on June 22, 2020. Wang et al, 2020 [6] developed a hybrid Logistic and Prophet model to estimate the peak point, the fastest growth point, the turn point of cured cases and the epidemic size in the globally and other countries (Brazil, Russia, India, Peru and Indonesia). Yadav et al, 2020 [21] investigated the COVID-19 spreading in the USA and China and the rest of the world for a future period of 10 days using Prophet model and average daily growth. Ndiaye et al, 2020 [18] used stochastic susceptible-infectious recovered (SIR) and prophet model and estimated that more than 1.2 million reported cases globally on April 7, 2020. Ndiaye et al, 2020 [22] applied linear regression, Polynomial regression, Support Vector Regression (SVR), Prophet and Multilayer Perceptron (MLP) to forecast the COVID-19 cases in Senegal. The study showed that Prophet and MLP has the best Root Mean Square Error (RMSE). Zhu and Wang, 2020 [23] compared the performance of different models ARIMA (ARIMA(5,1,5), ARIMA(2,2,1) with Weekly Data), Prophet (Linear FB Prophet, Seasonal Adjusted Logistic FB Prophet, Logistic FB Prophet with Weekly Data) and XGBOOST to predict daily increase in COVID-19 cases In the USA. The study showed that the Prophet model with logistic and seasonality out-performs ARIMA model and the XGBOOST machine learning process. Kumar and Susan, 2020 [24] applied ARIMA and Prophet models to forecast COVID-19 cases in the 10 most affected countries (USA, Spain, Italy, France, Germany, Russia, Iran, UK, Turkey, India, and worldwide. The authors reported that ARIMA has better performance than Prophet in term of MAE, RMSE, RRSE, and MAPE error matrices in most of the studied countries. In the same way, Papastefanopoulos et al, 2020 [25] reported that the Prophet model did not achieve superior performance in any of top 10 most affected countries than ARIMA, the Holt-Winters additive model (HWAAS), TBAT (Trigonometric seasonal formulation, Box-Cox transformation, ARMA errors and trend component) and N-Beats.
In this work, we use the Prophet model to analyze and forecast the spread of the coronavirus in Algeria.

Data collection
In the present work, datasets of COVID-19 were taken from the daily reports of the Algerian Ministry of Health. The datasets cover confirmed cases, recovered and deaths from February 25 th , 2020 to December 12 th , 2020 [26]. The number of confirmed cases was calculated based on RT-PCR tests. The figure on December 12 th , 2020 showed a number of 91121 cases on, 59579 recovered cases and a number of 2575 deaths.
We first calculated the day wise active cases (ac), active rate (ar), death rate (dr), and cured rate (cr) (figure) by the following equations: Here: cc represents confirmed cases, dc is the death cases and rc represents the recovered cases in a time i (from the first day to ....).
We obtained a dataset of Algeria with the following columns: date, confirmed cases, deaths, recovered cases, active cases, active rate, death rate and cured rate. Prophet model is an open source tool developed by Facebook for forecasting time series analysis based on simple linear equation which include three parameters: trend, seasonality and holidays [19]. Prophet includes a decomposable time series model defined by the following equation: tr (t) is the trend that can be defined as non-periodic changes in terms of growth, se(t) represents the seasonal change that can be measured in form of weekly, monthly or annually, ho(t) define the effects of holidays which occur on potentially irregular schedules over one or more days and id(t) that define individual changes not accommodated by the model.
The prophet trend can be illustrated by two functions according to the growth nature: -If growth is logistic, the trend is defined by the Saturating growth model given by the following Equation: Where: CC is the carrying capability, gr is the growth rate, and d represents an offset parameter.
If growth is linear, the trend is measured by Piecewise linear model defined by the equation: Where: gr is the rate of growth, d is changing in the rate, d represent the displacement.
The effects of changes periodically in daily, weekly and annual seasonality of the data set are defined by the equation below: Finally, the holiday impact can be calculated by the equation: Where: ￡ is a parameter assigned to each holiday, which represents the corresponding change in the forecast. To validate the fitness and prediction performance of the Prophet model for active rate, cured rate and death rate, the following metrics were calculated: the mean absolute error (MAE), the mean d absolute percentage error (MAPE), the median absolute percentage error (MDAPE), the mean square error (MSE), and the root mean square error (RMSE). These parameters were calculated and validated in a horizon of 50 days check points.

Results and discussion
The forecast has been performed for the confirmed COVID-19 rate, recovered (cured) rate and death rate in Algeria. The raw plot shows an increasing trend of the cured rate while the trend of deaths and cured rate shows a net decrease (Fig. 2a, 3a and 4a). Figures 2b,  3b and 4b show the weekly increase of confirmed, cured and deaths cases in Algeria.
The plot indicate that the number of daily cases is more often reported on Fridays compared to other days of the week while the number of deaths is more frequent in Saturday, Sunday and Wednesday.    The predicted cases rate, cured rate and death rate for the 09 days of February 2021 are shown in tables 1.
Results show that the active rate on February 09, 2021 will be about 2.55%. The active rate is estimated at 19.7% and the cured rate is estimated at 78.85%.  Figure 14. RMSE values for death (a), active (b) and cured rate (c)

Conclusions
In this work we used FB prophet model to predict Active rate, death rate and cured rate of COVID-19 in Algeria. Results showed that the active rate and the death rate will decrease in the future days in parallel with an increasing of the cured rate. The FB Prophet model could be helpful in adopting the best preventive measures. .

Funding: Not applicable
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable. .