# Predicting the Spread of a Pandemic Using Machine Learning: A Case Study of COVID-19 in the UAE
## 3 Methods and Datasets
### Data Exploration  
Before the data can be fed into the machine learning models, certain analysis needs to be done so as to understand the behavior of the time series. Time series data can have trends only if a certain pattern in the data repeats itself on regular intervals of time due to any external factors and is not random; therefore, we need to test the quality of the given dataset such that it consists of a trend in which we can analyze. For this, autocorrelation plots are derived to determine whether the elements of the time series are random or not. Autocorrelation determines the similarity between a certain data point and its past within a time interval called lag. As seen in Figure 5, the horizontal axis shows the lag between two elements, so, for example, a lag of 2 means values observed two time periods earlier than the current observation. The vertical axis shows the results of the autocorrelation function and ranges from \(-1\) to \(1\), where a value from \(-1\) to \(0\) is a negative correlation and a value from \(0\) to \(1\) is a positive relation [39]. Any value closer to \(1/-1\) means a higher level of correlation. Figure 5 shows the autocorrelation plots for each of the attributes. The autocorrelation with lag \(0\) will always be \(1\) as it is the autocorrelation between itself and can be ignored. As all the spikes are above zero, they are statistically significant which means that all the values are highly correlated and signifies that when the values of the trend are rising, it will continue to rise with time and when the values of the trend are falling, they will continue to fall. Hence, the time series can be considered as not random but following a significant trend. Time series are divided into two types, stationary and non-stationary. Stationary series are those series that do not depend on time components such as seasonality effects and trend, while non-stationary series are series that change trend with respect to time and seasonality effects. Although, from domain knowledge, it is well-known that a pandemic such as COVID-19 changes with time and external environment, and hence will be a non-stationary series, it is still important to verify this hypothesis. For this purpose, the Augmented Dickey Fuller test [40] was conducted. It is also important to check as statistical models can only use stationary series and, hence, if the series is non-stationary, it is better to use machine learning models. If the \(p\)-value obtained is between \(5\) and \(1\%\), the null hypothesis is rejected and does not have a unit root and is hence a stationary series. If the  
Figure 5: Autocorrelation graph for each of the attributes. The X-axis represents the different lag periods while the Y-axis represents the autocorrelation. \(p\)-value obtained is greater than 5% or 0.05, the input data has a unit root and is regarded as a non-stationary series [23]. Table 4 shows the \(p\)-values for each of the time series. It is noticed that all attributes except Confirmed Deaths show much higher \(p\)-values than the threshold. The statistical significance for Confirmed Deaths is on the edge of the hypothesis threshold, which is why it is still considered as a potential confounding variable and introduced into the studies. Although there is a change in the values of the attribute based on external factors, the magnitude of the relation change is less. This explains why the death rate in the UAE with regard to COVID-19 is very low. Moreover, Pearson correlation [41] was conducted to explore correlations between the dataset attributes. The Pearson product-moment correlation coefficient (r) measures the strength of a linear association between two variables. The value of r ranges from \(-1\) to \(+1\), with values towards \(+1\) having stronger correlation, values of 0 having no correlation at all, and values towards \(-1\) showing a strong negative correlation, i.e., if one variable increases the other decreases [42].