Application of Weighted Fuzzy Time Series Model to Forecast Epidemic Injuries

Aims: It is important to predict the amount of COVID-19 injuries. Since the first suspected case of novel coronavirus (2019-nCoV) on December 1st, 2019, in Wuhan, Hubei Province, China, a total of 40,235 confirmed cases and 909 deaths have been reported in China up to February 10, 2020, evoking fear locally and internationally. Here, based on the large amounts of daily publicly available epidemiological data and the need to make an accurate prediction of future behavior requires the definition of powerful and effective techniques capable of inferring random dependency between the past and the future from observations. In this paper, we apply a rewarding model to predict injuries in areas where COVID-19 is, especially in the Arab region. This forecast uses epidemic injuries data from March 2 nd , 2020 to July 20 th , 2020 in Saudi Arabia. Methodology: We propose the use of weighted fuzzy time series techniques (WFTS) and weighted non-stationary fuzzy time series techniques (WNSFTS) to be compared with the classical AutoRegressive Integrated Moving Average (ARIMA) statistical method. The available data is not a stationary and should therefore be converted first to stationary to forecast it with (ARIMA) and (WFTS) techniques. We do a log transform and differencing on our injuries dataset. Results: When we examine the original data by Dickey-Fuller Test (DFT) to get p-value, we find it is equal to 0.646, it is more than 0.05 which implies the non-stationarity. The mean square error Method Article Abdul-Moneim; CJAST, 39(24): 79-90, 2020; Article no.CJAST.60134 80 (MSE), the root mean square error (RMSE) and normalization root mean square error (NRMSE), are applied to compare the accuracy of the methods. The results show that WFTS methods give good services for predicting epidemic injuries in the territory by COVID-19. Conclusion: The use of Weighted Non Stationary Fuzzy Time Series (WNSFTS) in forecasting epidemic injuries problem can provide significantly better results because it is able to predict the infected cases at the next time and achieve great predictive accuracy.


Context
The newest zoonotic Coronavirus disease that crossed species to affect humans and spread in an unprecedented manner is COVID-19, as named by World Health Organization (WHO) on 11 th February 2020. More than 300,000 cases have been confirmed across 166 countries in six continents, causing more than 13,000 deaths in less than three months.
For Arabic Zone in Africa as mentioned in [1] the first case in Egypt was discovered at Cairo International Airport involving a Chinese national on 14 th February, then on 6 th March, the Egyptian Health Ministry and WHO confirmed 12 new cases of coronavirus infection. The infected persons were among the Egyptian staff aboard the Nile cruise ship which was travelling from Aswan to Luxor. Also on March 7 th , 2020, health authorities announced that 45 people on board had tested positive, and that the ship had been placed in quarantine at a dock in Luxor.
The first case in Morocco was confirmed to have spread on March 2 nd , 2020, when the first case COVID-19 case was confirmed in Casablanca where it involved a Moroccan expatriate residing in Bergamo, Italy who arrived from Italy on 27 th February. An 89-year-old woman Moroccan residing in Italy who had returned to Morocco on 25 th February from Bologna, Italy was confirmed as the second case. In mid-March the Government closed schools and suspended international passenger flights as the outbreak widened in Morocco. The first case in Algeria was confirmed to have spread in February 2020 that was an Italian man who arrived on 17 th February. After that on 28 th February, Algeria deported him back to Italy via a special flight. Fig. 1 shows the cumulative number of confirmed cases in 23 Arabic countries until 23 rd July 2020.

Fig. 1. Cumulative Cases in Arabic
In Asia for the biggest, most important Arabic Zone, Saudi Arabia, the first case, as mentioned in [2] was confirmed on 2 nd March that is a Saudi national returning from Iran via Bahrain. So the government agencies started to take the necessary measures to reduce the spread of the virus. Then on Friday, 20 th March, Saudi Arabia announced it is going to suspend all domestic flights, buses, taxis and trains for 14 days amid global coronavirus outbreak and after a week on 26 th March, authorities announced a total lockdown in Riyadh, Mecca and Medina, plus a nation-wide curfew.
When we analyze the effect of lockdowns in several countries we find that the complete lockdowns helped to reduce the number of affected cases significantly. However, although the lockdown has been gradually lifted, the use of the media and social media to disseminate awareness and information about prevention, screening, testing and policies in different countries and the power of health care services has been more effective in reducing the spread of the disease. Such as the lockdown in Saudi Arabia was considered to be on 15 th March 2020. Fig. 2 shows that the maximum injured number was happened after the partially lockdown began in June and then the numbers started to fluctuate day after day in July.

Fuzzy Time Series Forecasting
Corona Statistics around the world and My health statistic to directly monitor cases globally and locally are modeled by a simple visibility graph. Fig. 3 shows the daily real-time growth rates estimating detected cases in territories where COVID-19 until July 20 th in Saudi Arabia. Time dependencies that cause identical points of time to belong to different categories or predict different behavior are constituting a so called "Time series". Time Series model is one of the commonly used statistical models in analytics where, previous data and recent data are studied in order to make predictions. It has wide applications in finance, construction costs prediction, and some other fields. Autoregressive integrated and moving average (ARIMA) and seasonal ARIMA models are developed that can study linear and stationary time series [3].
It became increasingly clear that linear models are not adapted to many real applications [4]. Song, et al. [5] defined and studied the observations of special dynamic process with linguistic values. This dynamic process is referred to "fuzzy time series". Fuzzy models or sets are mathematical tools of representing vagueness and imprecise information (hence the term fuzzy). Some key features distinguish the Fuzzy Time Series: simplicity and scalability [6]. The use of fuzzy logic has been applied in the literature for time series forecasting and provides a significant improvement over the traditional statistical methods because it is non-linear and it is able to approximate any complex dynamical systems better than linear statistical models [7]. In academic enrollments, Preetika Saxena and Santhosh Easo [8] proposed a method based on fuzzy time series, which gives the higher forecasting accuracy rate than the existing methods. On an Internet of Things (IoT)-based analysis system, Satpathy, et al. [9] developed a fuzzy classifier which results in a lower execution time in comparison with that of previous models, such as K-nearest neighbor, decision tree, support vector machine, and naive Bayes. In the field-programmable gate array (FPGA) analysis system with the help of fuzzy system, Satpathy, et al. [10] designed a novel method for prediction multiple diseases in a rural area. In cooking, Fuzzy logic control enables to obtain a cooking time for different type of rice and for different quantity of water [11]. A fuzzy logic technique and matlab graphical user interface technique helped Sambit and Ambika [12] to checking out the on, off status of rice cooker. If there is any trouble then it smartly detect it and solve it automatically. In a solar forecasting problem the use of Fuzzy Time Series (FTS) provides significantly better results than other approaches in the literature [13]. Based on Weighted Fuzzy Time Series (WFTS), K. A'yun,et al. [14] predict Trans Jogja passenger and stated that forecasting process with WFTS model is better than forecast with fuzzy time series model. FTS

Markov chain (FTSMC) model urged Mahmod
Othman, et al. [15] to predict a daily air pollution index model based on a grid method with an optimal number of partitions, which can greatly develop the model accuracy for air pollution and stated that the proposed forecasting method has produced a higher prediction accuracy as compared to some FTS models. There have been still more areas where FTS have been applied.

Our Contribution
In this paper, we propose and investigate the use of some methods based on Fuzzy Time Series(FTS) to perform epidemic injuries forecasting in Arabic Zone in territories where COVID-19 epidemic injuries forecasting is a very hard forecasting problem. FTS methods are providing good results for hard forecasting problems [16] or stock market forecasting [17]. We introduce the application of one-variable FTS in epidemic injuries forecasting, describing the data and discussing preprocessing steps. The high-order FTS methods and the Weighted FTS methods are compared with ARIMA forecasting models widely used to approach epidemic injuries forecasting. We evaluate the performance of FTS methods and different forecasting techniques to solve epidemic injuries forecasting problem. The results show that FTS methods are able to achieve significant improvements in forecasting accuracy and performance if compared to the other methods taken for the comparison in the present study. We forecast the epidemic injuries in Saudi Arabia, from 2 nd March 2020 to 20 th July 2020.

Prediction and Forecasting
In statistics, prediction is a part of statistical inference. One particular approach to such inference is known as predictive inference, but the prediction can be undertaken within any of the several approaches to statistical inference. When information is transferred across time, often to specific points in time, the process is known as forecasting. Prediction is more general term. Both refer to formal statistical methods employing time series.

Time Series
Time Series is a forecasting method . It is a sequence of numerical data points in successive order. Such as values detecting the cases that has affected by a disease, over a specified period with data points recorded at regular intervals. We use historical values and associated patterns to predict future activity. Malhotra et al. [18] defined Time-Series as a vector. A stationary time series is one whose statistical properties such as mean, variance, autocorrelation are all constant over time. Such statistics are useful as descriptors of future behavior only if the series is stationary. Nonstationary data should be first converted into stationary data. In this study, we use Dickey-Fuller Test to test stationarity. When the p-value is less than a certain value (α=.05), the data is stationary.

ACF and PACF
ACF is an auto-correlation function which gives us values of auto-correlation of any series with its lagged values, it describes how well the present value of the series is related with its past values.
PACF is a partial auto-correlation function, it finds correlation of the residuals with the next lag value hence 'partial' and not 'complete' as we remove already found variations before we find the next correlation. So if there is any hidden information in the residual which can be modeled by the next lag, we might get a good correlation and we will keep that next lag as a feature while modeling [19].

Models
Models can be classified into:

Compartmental models
Compartmental models its basis is the assumption that the entire population is divided into groups, ie, compartments [20]. Compartmental models simplify the mathematical modelling of infectious diseases as in [21]. The simplest compartmental model is the SIR model, and many models are derivatives of this basic form. SIR model is reasonably predictive for infectious diseases that are transmitted from human to human. SEIR is an epidemiological model consists of four possible states:  [23] used a modified susceptible exposedinfected-removed (SEIR) epidemiological model that incorporates Kthe domestic migration data before and after 23 rd January and the most recent COVID-19 epidemiological data to predict the epidemic progression. Yi-Cheng Chen,et al. [24] presented mathematical and numerical analyses that address important questions for COVID-19. Can Hou, et al. [25] investigated that, by reducing the contact rate of latent individuals, interventions such as quarantine and isolation can effectively reduce the potential peak number of COVID-19 infections and delay the time of peak infection. Abdullah Murhaf Al-Khani and Mohamed Abdelghafour Khalifa [26] estimate that by the time the Hajj season commences in Saudi Arabia, the pandemic will be in the midst of its deceleration phase (phase 3). Haitham khoj and Alaa F Mujallad [27] employ SIR model to forecast the peak of COVID-19 progression and an estimation of it is end in Saudi Arabia. Peiliang Sun and ang Li [28] present a new model produces some consistent estimates on the total death toll if community spread is greatly suppressed after 23rd March in UK.

Statistical models
Models for time series data can represent different stochastic processes. There is a specific collection of methods and techniques that well suited for predicting the value of a dependent variable according to time such as the autoregressive (AR) models, the integrated (I) models, and the moving average (MA) models. These three classes depend linearly on previous data points [29]. Combinations of these ideas produce autoregressive moving average (ARMA) and autoregressive integrated moving average (ARIMA) models. The autoregressive fractionally integrated moving average (ARFIMA) model generalizes the former three. Rob J Hyndman and George Athanasopoulos [30] provided a comprehensive introduction to forecasting methods and presented enough information about each method.

Fuzzy time series representation
Not all time series are known to be stationary, meaning that their mean values are (more or less) constant. In non-stationary series, the mean changes over time. Zadeh [31] proposed the Fuzzy Logic and state that a certain element may belong and simultaneously do not belong to the same set at certain levels, such that the membership is a value in the interval [0, 1]. Song and Chisson [32] are the pioneers in working on fuzzy time series. Chen [33] presented the idea of dividing the Universe of Discourse from time series in intervals/partitions (the fuzzy sets), and how each area behaves (extracting rules through the time series patterns) that is create a linguistic variable to represent the numerical time series, and these areas will be the linguistic terms of our variable.

Data Set Description and the Applied Methods
Data on COVID-19 were obtained from the Saudi Arabian Ministry of Health and the World Health Organization. Statistics from March 2 nd , 2020 to July 20 th , 2020 were retrieved from [34]. The dataset consists of daily case reports and daily time series summary tables. Data must be stationared for the applied methods included in the following (i) and (ii). Methods included in the following (iii), it is for non-stationared data. The applied methods that we will implement (individually) include:  The classical statistical methods (AR), (MA) and ARIMA (as described in [35]). We applied these methods to compare the performance of the other used method with it.  The probability weighted fuzzy time series (PWFTS), the high order fuzzy time series (HOFTS) and weighted fuzzy time series (WFTS) methods (as described in [13]).  The high order non-stationary fuzzy time series (HONSFTS) and weighted nonstationary fuzzy time series (WNSFTS).
In order to evaluate the results, we apply (individually) the statistical metric mean square error (MSE), root mean square error (RMSE), and its normalized form (NRMSE). They are defined by (1)-(3).

Determining Stationary Data
Before predicting data must be stationared, raw data taken from daily rates estimating detected injuries cases from 2nd March 2020, to 20th July 2020 in Saudi Arabia. Another method to examine data if it is stationary, it is divided into groups and compare its mean and its standard deviation. Table 1 shows the statistics properties for each group.
It is clear that the mean, variance, are not the same so data are not stationer. Fig. 4(a) shows non stationary data. Thus data has to be subject to some transfers. Injuries values can be seen as time series. Better results in forecasting can be obtained if these components are eliminated or mitigated [35]. Fig. 4(b) shows both trend and seasonality are modeled separately and we process the remaining part of the series (Residuals). Fig.4(c) shows the time series after had stationaried by using a quick log transform and differencing on our dataset. Test stationarity by Dickey-Fuller Test gives that the p-value of the residuals data was less than 0.05 it was 0.00042. Fig. 4(d) shows the auto correlation function ACF and partial auto correlation function PACF of injuries data after the differencing process.

EXPERIMENTS
This work was implemented using python programming language version 3.7. Our experiments were carried out using a number of python libraries some of which include:  Pandas Library -For reading excel data.  PyFTS Library -To implement fuzzy time series models (FTS).  Matplot Library -For visualizing the applied algorithms.  Numpy Library -For calculations.  Statsmodels Library -For viewing the correlation between our dataset by ACF and PACF, testing stationarity and to implement ARIMA models.

Forecasting Using ARIMA
In this study, the experiments were applied to evaluate the performance of the applied forecasting methods in terms of accuracy and elapsed time. We apply ARIMA and special cases of ARIMA models are AutoRegression (AR) which is ( , 0,0) and Moving Average (MA) which is (0,0, ). Table 3 shows the results of forecasting in terms of accuracy sorted by NRMSE. Fig. 5 (c) shows the forecasting in red colors using the applied ARIMA methods.

Forecasting Using Fuzzy Time Series
The forecasting process of injuries with stationary data that has been obtained is conducted by the steps as stated in [13] and [14]. Fuzzy time series (FTS) has a different representation of a time series. If a time series are represented by real numbers, fuzzy time series are composed by fuzzy sets which form the universe of discourse for the forecasting problem. The universe of discourse is obtained from the range of values observed in the time series. In our study we use a grid scheme (GridPartitioner) with 35 partitions, separated into 5 subgroups, VL-Very Low, L-Low, M -Medium, H-High and VH-Very High, each subgroup with 7 levels. We applied the high order monovariate(one-variable) methods with and without weights and all of them were tested with the order of 1 to 3. The order parameter is how much past information is needed to describe future events. The methods are implemented using python version 3.7 and the models package are in the "pyFTS" library. Training Data from March 2 nd to June 2 nd and testing data from June 3 rd to July 20 th .

Forecasting using stationary fuzzy time series
We applied High Order FTS (HOFTS), High Order Weighted FTS (WHOFTS) and Probabilistic Weighted FTS (PWFTS) methods. Table 3 shows the results of forecasting in terms of accuracy. Fig. 5 (b) shows the forecasting in red and orange colors using the applied methods.

Forecasting using non-stationary fuzzy time series
We applied the non-stationary time series forecasting models. We have provided a comparative evaluation of the performance of the non-stationary fuzzy time series (NSFTS), weighted non-stationary fuzzy time series (WNSFTS) and high order non-stationary fuzzy time series (HONSFTS) models. The input data for the methods was a time series raw-data of epidemic Injuries of Saudi Arabia. Table 4 shows the results of forecasting in terms of accuracy sorted by NRMSE. Fig. 5 (a) shows the forecasting in red and orange colors using the applied methods.    (1,0,1)

CONCLUSION
Based on the results, this study suggests that the use of weighted Fuzzy Time Series (WFTS) in the epidemic injuries forecasting problem can provide significantly better results than the classical statistical methods. To better illustrate the prediction performance of the method, it is compared with classical time series prediction methods including autoregressive integrated moving average ( ARIMA), Auto Regressive (AR) and Moving Average (MA) and other prediction fuzzy time series methods(FTS) includes, high order fuzzy time series(HOFTS) and probabilit weighted fuzzy time series(PWFTS). Tables 2, 3, 4 listed the forecasting errors of the comparison methods and they also present the average time in seconds. In terms of accuracy, the methods PWFTS, HOFTS and WHOFTS of order 3 have comparable results. They have the smallest MSE error. The weighted non-stationary fuzzy time series (WNSFTS) model of order 1 presented the faster testing time, while ARIMA model took a long time to implement. This can be an important improvement for forecasting problems, where usually large amount of non-stationary data needs to be processed at a reduced time. The results show that the proposed method can be . The predicted values (red and orange curves) are close to the actual ones (blue curve) stationared data using FTS.(b) Forecasting using residuals (stationared data) using FTS.(c) Forecasting using residuals (stationared data) using ARIMA Based on the results, this study suggests that the use of weighted Fuzzy Time Series (WFTS) in the epidemic injuries forecasting problem can provide significantly better results than the classical statistical methods. To better illustrate the prediction performance of the method, it is ical time series prediction methods including autoregressive integrated moving average ( ARIMA), Auto Regressive (AR) and Moving Average (MA) and other prediction fuzzy time series methods(FTS) includes, high order fuzzy time series(HOFTS) and probability weighted fuzzy time series(PWFTS). Tables 2, 3, 4 listed the forecasting errors of the comparison methods and they also present the average time in seconds. In terms of accuracy, the methods PWFTS, HOFTS and WHOFTS of order 3 have y have the smallest MSE stationary fuzzy time series (WNSFTS) model of order 1 presented the faster testing time, while ARIMA model took a long time to implement. This can be an important improvement for forecasting problems, where stationary data needs to be processed at a reduced time. The results show that the proposed method can be used to predict the epidemic injuries. This result is of relevance in the context of epidemic injuries forecasting. Future work will be to use case data. Therefore, future work is to evaluate techniques that could bring improvements to the multivariable FTS methods (MVFTS). We could try different advanced algorithms like: neuro fuzzy, weighted sum algorithms etc.

DISCLAIMER
Data used in this paper is available on (https://sehhty.com/sa-covid/). to the actual ones (blue curve) stationared data using FTS.(b) Forecasting using residuals (stationared data) using FTS.(c) Forecasting using residuals (stationared data) using ARIMA used to predict the epidemic injuries. This result is of relevance in the context of epidemic injuries work will be to use case-level data. Therefore, future work is to evaluate techniques that could bring improvements to the multivariable FTS methods (MVFTS). We could try different advanced algorithms like: neurofuzzy, weighted sum algorithms etc.