On December 31, 2019, the World Health Organization (WHO) was informed about an outbreak of pneumonia of an unknown cause in Wuhan City, Hubei Province of China [40] . Barely two weeks past, the first case of coronavirus disease 2019 (COVID- 19) outside China was reported in a Chinese tourist in Thailand with no epidemiological linkage to the Huanan Seafood Wholesale Market [24] . Since then, COVID-19 quickly escalated worldwide infecting more than 200 countries and millions of people [41] . The COVID-19 which is caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), is a kind of viral penumonia [28] . The most common symptoms at the onset of the disease include fever, cough, fatigue, dyspnea, myalgia, normal or decreased leukocyte counts, and radiographic evidence of pneumonia [28, 35] . Several evidences suggest that it can be transferred from person-to-person through direct contact or through droplets spread by coughing or sneezing from an infected individual [35] .
Rapid increase in daily infection rates, severity of the cases, and death toll proved that the disease is highly contagious and infectious. In the absence of a vaccine, prevention and control are vital to suppress the spread of the virus in a way that the healthcare system can contain the surge of patients, and the economy can recuperate the impacts of lockdown restrictions. To this aim, modeling and forecasting are very important to lay down effective and data-based decisions, strategies, and policies. Since the outbreak of COVID-19, there have been many publications using various mathematical and machine learning-based models that forecast the spread and give a prediction of the epidemic peak globally, for specific countries such as in Brazil [34] , Russia, India, and Bangladesh [32] , and USA [2] .
The dynamics of the COVID-19 infection vary per country and depend on many factors such as the government's response, the capacity of the healthcare system, testing and contact tracing efforts, quarantine and lockdown impositions, and reaction of the general public to the pandemic. In the Philippines, the first case of COVID-19 was reported on January 30, 2020 while the first local transmission was confirmed on March 7, 2020 [39] . On March 17, 2020, the Philippine government declared an enhanced community quarantine (ECQ) in the entire island of Luzon and other parts of the county for a month and later extended until April 30 to curb the transmission of the disease [21] . Months since the lockdown, the economy gradually reopened with less stringent quarantine regulations in each province or region. However, the daily infection cases have not been significantly reduced yet. As of September 7, 2020, the total cases in the Philippines escalated to 238,727 [23] . Therefore, continuous effort to model and forecast the spread of the disease in the country is very helpful in the fight against COVID-19.
The UP-OCTA team has been actively forecasting the spread of the disease in different places in the Philippines. From April 30 to July 23, they were able to produce nine forecasts of COVID-19 cases using Susceptible-Exposed-Infected-Recovered (SEIR) models and Moving Average models [9, 8, 12, 13, 11, 7, 10, 15, 14] . The heterogeneous characteristics of different age populations were incorporated in studying the effects of the ECQ in reducing the exponential growth of the disease as well as the forecasts of transmission rate [17] . An SEIR model considering the symptomatic and asymptomatic populations was developed in [1] to describe the dynamics of the disease. The group used the data on the confirmed cases and death from several countries including France, Philippines, Italy, Spain, United Kingdom, China, and the USA to calibrate the model. This study forecasts the cumulative daily cases of COVID-19 in the Philippines using various mathematical models. We examine six models and determine which best suits the considered Philippine data. The models under comparison are moving averages, exponential smoothing, SEIR, Ornstein-Uhlenbeck process, Autoregressive Integrated Moving Average (ARIMA), and random forest. The data set is fit using each of the models and subsequently, obtain forecasts for August 1-15. These forecasts are then compared to the actual values using various error metrics. The paper is organized as follows.
In Section 2, a description of the utilized data set is provided. Sections 3 to 8 discuss the implementation of the models and the derivation of the forecast values. The discussion on the comparison of the results from the six models is done in Sections 9 and 10.
Since April 12, COVID-19 data in the country have been made available through the COVID-19 tracker in order to promote transparency and accountability of data in the country. The tracker provides a daily COVID-19 data drop which contains multiple COVID-19 infection-related data based on multiple cases such as specimen collection, release of result, date of the start of symptom for each patient, date of reporting/ confirmation of positive COVID-19 result, etc. We only consider the infections based on the date of reporting/ confirmation of positive COVID-19 result, as this is the commonly reported data to the public. Shown in Table 1 are the descriptive statistics of the data to be considered and Figure 1 illustrates the actual March 6 to July 31 data. In this study, we consider the number of cumulative COVID-19 infection cases in the Philippines from March 6, 2020 to July 31, 2020 (retrieved: August 1, 2020). We then forecast the cumulative cases for August 1 -15, and compare it to the actual values which were retrieved on August 24, 2020. We consider a half-month forecast, to account for the two-week quarantine period, to better prepare the concerned facilities/personnel, and to adjust accordingly to possible delays in reporting of cases.
In this section, we consider two types of moving average (MA) -the simple moving average (SMA) and the weighted moving average (WMA). We apply them to the cumulative cases to give forecasts for August 1 -15. There are many different intervals used in literature regarding COVID-19 such as 3−day, 5−day, 7−day, 10−day, and 14−day [19, 22, 38] . In most cases, the 7−day MA is considered to cover both the incubation period and the time it takes from the first symptoms to occur to diagnosis [22] .
The standard formula to get the forecast for the n th day for an m-day SMA, is given by
where C i is the number of total confirmed cases at time i. Simple moving average gives equal weights for all the data in a specific interval. While this is good for data sets whose entries are not dependent on the previous entries, it is far from good for those whose entries are highly dependent on the previous entries. Due to the increasing trend in the data set, it is better to consider higher weights in more recent entries. For this purpose, we also consider weighted moving average.
One of the most common weight functions used in weighted moving average is w(i) = 2i m(m + 1)
for the i th day in the m-day interval. The standard formula to get the forecast for the n th day for an m-day WMA is given by
where C i is the number of total confirmed cases at time i. Note that the sum of the weights in a weighted moving average must be equal to 1.
We consider 3−day, 4−day, 7−day, and 10−day MA to have a comparison among different intervals for both types of moving average.
We apply SMA to the cumulative cases but the result was undesirable. For example, the actual cumulative cases on July 31 is 93351 while the forecast total number of COVID-19 cases on August 1 using 4-day SMA is 87881, which is inconsistent since the total cumulative cases must be increasing. In fact, the forecast for August 15 is 89556, which is still lower than the total cases on July 31. Instead of applying SMA directly to the cumulative cases, we applied SMA to the daily cases. To get the forecast for the cumulative cases for August 1, we add the forecast for the daily cases on August 1 to the actual total cases as of July 31 .
Below is the table showing the forecasts using SMA on the different intervals mentioned. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in
The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint 
Similar to SMA, we apply WMA to the daily cases then we add the result to the total number of cases from the previous day to forecast the cumulative case. We consider several weight functions w r
for an m-day WMA, where r ∈ {1, 2, 4, 10}. The following table shows the different weights for the 4−day WMA. After comparing the results for the different values of r, we notice that the higher the value of r, the closer the forecasts to the actual values. Below are the forecasts for the different time intervals using r = 10. perpetuity.
preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in
The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint 
Exponential smoothing models are commonly used in time series forecasting. These models are simple since the forecasts are generated by obtaining weighted averages of the past observations where the weights exponentially decrease as the observations get older. Exponential smoothing models produce reliably accurate forecasts since they can also capture the trend, seasonality, or a combination of both [25] .
It can be observed from Figure 1 that the data has an increasing trend but has no seasonality. Hence, we choose Holt's linear trend method to obtain 15-day ahead forecasts of the total number of confirmed cases in the Philippines for it allows forecasting with trend.
The Holt's linear trend method (HLTM) extends the simple exponential smoothing method by using two smoothing equations both of which are dependent on the estimated level and estimated trend of the series at a particular time. The h-step ahead forecasting formula under this method is given by the following:
where, at time t, y t andŷ t+h represent the actual and the forecast values, respectively, l t represents the estimated level of the data, and b t represents the estimated trend of the data. Furthermore, α and β are the smoothing factors of the level and the trend, respectively, with 0 ≤ α, β ≤ 1.
The confidence interval of the forecasts is given by
} with σ as the variance of the forecast errors [25] .
We set the initial values of the parameters to be α = 0.5 and β = 0.5 with l 1 = y 1 and b 1 = y 2 − y 1 . We then calculate the 1-day forecasts and the the sum of squared errors (SSE). With this, we obtain the values of α and β that minimize the SSE subject to the restrictions of α and β. The values of the parameters that minimize the SSE are α = 1 and β = 0.5742. These parameters are used to calculate the 15-day ahead forecasts, as well as the forecast confidence interval of the cumulative daily COVID-19 cases in the Philippines. The summary is shown in Table 5 .
All rights reserved. No reuse allowed without permission. perpetuity. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint As expected from the Holt's linear trend method, we can see in Figure 4 that the 15-day ahead forecasts exhibit an increasing trend. Moreover, majority of the actual values lie within the prediction interval, suggesting that the method produced fairly reliable forecast values.
Differential equation-based models like the SEIR model give information which is useful in controlling different infectious diseases. These models describe disease's dynamics in macroscopic level [33] . In this study, we also include the Susceptible-Exposed-Infected-Recovered (SEIR) model to describe the dynamics of COVID-19 in the Philippines, taking into account the mortality due to COVID-19 infection. In this model, S is the number of susceptible individuals, E is the number of exposed individuals, I is the number of infected individuals, and R is the number of recovered individuals. Susceptible individuals may be in contact with infected individuals and are transferred to the exposed population at rate β. A portion σ of the exposed individuals will become infected. Infected individuals die at rate d or recover from the disease at rate γ.
The COVID-19 transmission dynamics is governed by the following set of equations:
is the transmission coefficient and N = S + E + I + R represents the total population size [5] . Here, R 0 is the basic reproduction number which is the expected number of secondary infections produced by an infected individual during his or her entire infectious period [16] . Table 6 shows the parameters used in the model and their values obtained from previous studies on COVID-19 while the diagram in Figure 5 describes the inflows and outflows of individuals in each compartment. The parameters near the arrows are rates for which the individuals transfer from one compartment to another. Sensitivity Analysis Sensitivity analysis is a method used to identify the effect of each parameter in the model output, which in this case, is the infected population (I). In this study, a global sensitivity analysis technique called partial rank correlation coefficient (PRCC) analysis is used. To implement PRCC, a stratified random sampling without replacement is used to obtain input parameter values. This method is called Latin Hypercube Sampling (LHS) which is introduced in [30] .
In Figure 6 , each bar corresponds to a PRCC value at an instance, specifically in days t = 67 + 10k, k = 0, 1, ..., 13. A large absolute PRCC value implies a large correlation of the parameter with the output.The value 1 means a perfect positive linear relationship while −1 means a perfect negative linear relationship. The parameters with high PRCC values (> 0.5 or < −0.5) are R 0 , σ, γ, and τ. Moreover, R 0 and σ have positive PRCC values implying that an increase in the values of these parameters will increase I. In contrast, γ and τ have negative PRCC values which means that a positive change in these parameters will decrease I.
All rights reserved. No reuse allowed without permission. perpetuity. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint 
The output using the SEIR model is made close to the gathered data by estimating some of the parameters for which the model output is sensitive. Reported COVID-19 cases and recoveries in the Philippines are available on the COVID-19 tracker. We use these data sets to estimate the reproduction number (R 0 ), progression rate from the exposed population to the infected population (σ), and the recovery rate (γ). The model output was found to have high sensitivity values on these parameters which indicate the parameters' influential effect to the outcome.We estimate these parameters by minimizing the error between the gathered data and the model output. The estimates are R 0 = 1.5811, σ = 0.013, and γ = 0.0069. Figure 7 shows the reported data and the corresponding best fit. 
Using the values obtained in the parameter estimation and the values gathered from other studies on the disease, we forecast the cumulative cases from August 1 -15 in the country. Table 7 shows the 15-day forecast using the SEIR model and Figure 8 displays the forecast vs actual data. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint Although a similar trend can be perceived in the estimates and the actual data, observe that the SEIR model gave low estimates and the error increases as time passes.This may be attributed to the sudden rise of cases in the month of August as COVID-19 testing in the country improves.
In this section, we assume that the daily cases denoted by X t , in the discrete sense, is governed by Ornstein-Ulenbeck (OU) process given by the stochastic differential equation
where α is the mean reversion, β is the drift of the process, σ is the volatility, and W t is a Weiner process. The parameters of X t are determined using the maximum likelihood estimation. The explicit solution (1) is given by
Using Euler-Maruyama approximation, the discrete version of (2) is given by
where {ω k+1 } is a sequence of IID standard normal random variables.
Let Θ = (α, β, σ) be the set of parameters needed with the corresponding likelihood function, L(Θ), given by
Notice that the likelihood function is a Radon-Nikodym derivative with respect to the idealized probability measure. Given n + 1 observations X = {X 0 , X 1 , ..., X n }, the log-likelihood function is
The maximum likelihood estimation requires the gradient of to satisfy the first order conditions, that is,
9 All rights reserved. No reuse allowed without permission.
perpetuity.
preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in
The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint Using the first and second components of (6), we get
1 − e −α∆k which will give us estimates for β and σ, given bŷ
A simpler approach to find an estimate for α is to solve the optimization problem
From the data set provided, we determine the parameters of the OU process using the previous subsection's methodology. Shown in Table 8 are the estimated parameters of the model. Using these parameters, we determine a 15-day forecast depicted in Table 9 . preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . Figure 9 is the plot of the forecasted values generated by OU process against the actual recorded values on August 1-15, 2020. IfX k is the forecasted value at time k,
where X 0 is the last actual value required from the forecast, and in our case, the actual value on July 31, 2020. Notice from the plot that the forecast values are slightly bent compared to the actual values, and this is due to the fact that as k increases from equation (7), the white noise generated by the actual value from the forecast relatively increases. The noise attributed is σe −αk t s e αu dW u and becomes zero in getting the forecasts. This class of models was developed by Box and Jenkins [3] and is intended to describe the process based on historical data. One characteristic of ARIMA models that separate it from other forecasting models is the incorporation of autocorrelation of the data set. This information describes the correlation between observations at different time lags. The general form is given by ARIMA (p, d, q), where p, d, and q refer to the number of autoregressive (AR) parameters, the order of differencing, and the number of moving average (MA) parameters, respectively. The AR component accounts for the pattern between time lags. The MA term measures the adaptation of new forecasts to prior forecast errors. The differencing is performed to remove the trend present in the data set and reduce the non-stationarity [37] . In this section, we forecast the cumulative number of COVID-19 infection cases in the Philippines for August 1-15 using an ARIMA model.
Due to the increasing trend in the data set as observed in Figure 1 , this results in the nonstationarity of the data set. To remove the trend, we perform first-order differencing. Using the Augmented Dickey-Fuller (ADF) test for stationarity, it was found out that the differenced data set is nonstationary at α = 0.05. We apply another first-order differencing (equivalently a second-order differencing to the original data set) and resulted in a stationary process using ADF at α = 0.05. The resulting stationary process is illustrated in Figure 10 .
11 All rights reserved. No reuse allowed without permission. perpetuity. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint 
We execute a correlogram analysis on the second-order differenced data set and the autocorrelation (ACF) and partial autocorrelation (PACF) plots are presented in Figure 11 . Significant spikes at lag one in the ACF and PACF suggest that an autoregressive (AR) process and a moving average (MA) process at that lag may help explain the data. We examine several models for different values of p (order of AR) and q (order of MA), with p and q capped at 5. We compare these models based on the Akaike information criterion (AICc) and the Schwarz's criterion (SBC). Based on the AICc, the best fit model is ARIMA (5, 2, 4) , while ARIMA (1,2,1) is found to the best fit using SBC. The comparison of the models based on AICc and SBC are shown in Table 10 . In Figure 12 , ARIMA (1,2,1) and ARIMA (5, 2, 4) are plotted against the original time series. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint The corresponding goodness-of-fit statistics for the two models are summarized in Table 11 . Using the statistics in Table 11 , we perform the Likelihood Ratio Test. At α = 0.05, the ARIMA(5,2,4) model does not fit the data significantly better than ARIMA (1,2,1). Therefore, the final ARIMA model is ARIMA(1,2,1) and its parameters are presented in Table 12 . Based on the model, the 15-day forecasts of the daily cumulative cases are presented in Table 13 . 
Random forest (RF) is a machine learning method for classification and regression problems based from Classification and Regression Tree (CART) and Bagging [31, 18] . Basically, it is a forest made up of a number of decision trees that grow in randomly selected subspaces of the feature space [18, 4] . The idea is to generate a combination of decision trees which will be bootstrapped from the learning sample and from a subset of random features from each chosen node. Every decision tree generated will be built on a subset of learning points and features that were considered from each chosen node to split on. Each tree will be grown to the largest extent possible, and there will be no pruning. After these trees have been fitted through bootstrapping, new forecast will be generated from averaging the forecasts of the trees [18] . An illustration of the process of forecasting in RF is shown below. Figure 13 : Forecasting process using random forest given n number of trees Aside from model fitting, RF has been extensively used in various machine learning forecasting studies such as electricity load, employee turnovers, and even on epidemics forecasting [18, 31, 20, 36] . Recently, it has also been used to analyze, predict, and evaluate COVID-19 in India, and COVID-19 patient health [27, 26] . Based from [27] on COVID-19 predictions in India, results from the random forest machine learning algorithm outperformed other machine learning methods. Thus, we implement RF to forecast the COVID-19 cumulative cases of infection in the Philippines.
Using the randomForest package in R [29] , we first set the training data and testing data to 148 (number of days from March 6 to July 31) and 15 (number of days to be forecasted), respectively. After which, we fit RF on the training data set with the following parameter inputs: Figure 14 , notice that RF produced underestimates compared to the actual values for the August 1 -15 COVID-19 infection cases in the Philippines. Some of the initial values were almost captured on the interval, but the further increase of actual COVID-19 cases data in the Philippines was not captured in our result, which showed an almost linear trend based from the plot. Abundance in data is necessary for a better forecast for a machine learning algorithm, which was not evident in this case. Increasing the number of trees did not also differ from the result generated with 1000 trees.
We plot the 15-day ahead forecasts for August 1 -15, 2020 from the six models: 3-day WMA, exponential smoothing using HLTM, SEIR model, OU process, ARIMA model, and RF. We then compare them to the actual cumulative cases of infection data in the Philippines.
15 All rights reserved. No reuse allowed without permission. perpetuity. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint Figure 15 , notice that all models except RF were able to follow the trend of the actual data. The RF model failed to observe an increasing trend compared to the other models, and was not able to forecast the data well. Of those models that continued to increase, the ARIMA model, 3-day WMA, and HLTM were able to maintain a difference of less than 10,000 cases from the actual data, given the considered forecast period. As the 15th day forecast was approached, the ARIMA(1,2,1) model is closest to the actual values. An error analysis of the deviations among the model forecasts of the cumulative cases of infection data in the country is shown in Table 15 . The error metrics used are root mean square error (RMSE), absolute mean error (MAE), and relative absolute error (RAE). The RMSE is calculated through RMS E = 1 K K k=1 (c k −ĉ k ) 2 , MAE is calculated through MAE = 1 K K k=1 |c k −ĉ k |, and RAE is calculated through RAE = K k=1 |c k −ĉ k | K k=1 |c −ĉ k | , where c k are the actual values,ĉ k are the forecasted values, and c is the mean of the actual values with K = 15. From all the error metrics, the ARIMA(1,2,1) model forecasts have the least errors while the random forest forecasts have the highest. Therefore, among the six models used in this study, ARIMA(1,2,1) has the best forecasts of cumulative COVID-19 cases in the Philippines from August 1-15, 2020.
In this study, we obtained 15-day ahead forecasts for the daily cumulative COVID-19 cases in the Philippines using mathematical models namely 3-day weighted moving average, exponential smoothing using Holt's linear trend method, SEIR model, Ornstein-Uhlenbeck process, ARIMA (1,2,1) model, and random forest. We considered the March 6 to July 31 COVID-19 infection data (based from public confirmation date) retrieved from the DOH COVID-19 Data Drop. All models except the random forest produced forecasts that exhibit an increasing trend, with ARIMA (1,2,1) having the closest forecast values to the actual August 1 -15 data based on the error analysis.
Results from the study can be used by policymakers in determining which forecast method to use/ adapt in their community, especially to those with case behavior similar to the Philippines. These 15-day ahead forecasts provide data-based information for the preparation of the personnel and facilities, and delivery of an effective response. Others may also replicate the methods used and might have a different "best model" for their community. We do note that all models used in the study were based on the retrieved data drop only. Thus, factors that might affect the actual data values such as delay or error in reporting were not considered and might have an effect to the result of this study. A longer amount of data considered might also produce more accurate forecast results. Moreover, we only considered cumulative cases based from the public confirmation date and thus, further studies may consider other data in the data drop, such as cases based on date specimen collection, release of result, 16 All rights reserved. No reuse allowed without permission. perpetuity. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint All rights reserved. No reuse allowed without permission. perpetuity. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint All rights reserved. No reuse allowed without permission. perpetuity. preprint (which was not certified by peer review) is the author/funder, who has granted medRxiv a license to display the preprint in The copyright holder for this this version posted October 12, 2020. . https://doi.org/10.1101/2020.10.07.20208421 doi: medRxiv preprint