Literature DB >> 34104629

Steady state Kalman filter design for cases and deaths prediction of Covid-19 in Greece.

N Assimakis1, M Adam2, A Ktena1, C Manasis1.   

Abstract

In this work we study the applicability of the steady state Kalman filter in order to predict new cases and deaths of Covid-19. We use the actual observations of new cases and deaths. First, we deal with short term prediction, namely daily prediction. We propose the use of the golden steady state Kalman Filter, which is designed to have parameters related to the golden section. It was found that the proposed golden steady state Kalman Filter has a satisfactory behavior compared with the classical mean or average filter. Secondly, we deal with long term prediction, for example average prediction per quarantine period (14 days). We propose to process blocks of measurements of time window corresponding for example to the quarantine period in order to predict the average of cases and deaths using steady state Kalman Filter. It was found that the proposed golden steady state Kalman Filter produces more reliable predictions than the classical mean or average filter does. The use of steady state Kalman Filter for cases and deaths prediction of Covid-19 can be effective for resources and prevention measures planning.
© 2021 The Authors. Published by Elsevier B.V.

Entities:  

Keywords:  Covid-19; Kalman filters; Prediction; Steady state

Year:  2021        PMID: 34104629      PMCID: PMC8175047          DOI: 10.1016/j.rinp.2021.104391

Source DB:  PubMed          Journal:  Results Phys        ISSN: 2211-3797            Impact factor:   4.476


Introduction

The ongoing pandemic of Covid-19 has driven researchers to direct their efforts towards the fight against the disease and the crisis management in health sector and border control. An important aspect in controlling the spread of Covid-19 and in resources and prevention measures planning, is the prediction of new cases and new deaths. Well established epidemiological models for long-term predictions, include variations of the Susceptible – Infectious – Recovered (SIR), such as the Susceptible – Infectious – Recovered – Dead (SIRD) [1] or the Susceptible – Exposed – Symptomatic infectious – Asymptomatic infectious – Quarantined – Hospitalized – Recovered cases – Dead (SESAQHRD) model, which focus on the basic reproduction number (R0), and the per day infection mortality and recovery rates [2]. The lack of a Covid-19 registry with traceable data obtained in a systematic manner and the lack of effective, well targeted or constant counter measures make the modeling of the Covid-19 outbreak a difficult task. Machine learning techniques have also been proposed [3], in order to face this difficulty. In [3], a moving average (MA) filter is used in order to forecast new daily cases and a Long Short Term Memory for Data Training-SAE (LSTM-SAE) network model was used to forecast the virus spreading. Time varying Kalman filters have been applied to daily predict new cases and deaths in [4]. An Autoregressive Integrated Moving Average (ARIMA) model is used in [5] to predict the epidemiological trend of the prevalence and incidence of Covid-19. Kalman Filter with the Autoregressive Integrated Moving Average (ARIMA) model is used in [6] to obtain forecasts of active cases, recoveries and deaths related to Covid-19 in Pakistan. Kalman Filters have also been proposed to estimate the future spread of Covid-19 [7] giving satisfactory results on short term estimates; their performance is poorer for long term forecasting. The motivation of this work has been the development of tools for cases and deaths predictions, based on steady state Kalman Filter, that will allow the health system and authorities at the local or regional level to better prepare and manage the crisis. They may also be used in an early warning and emergency response system which collects ubiquitous data, such as smart city or smart building data, and combines it with historical statistical data and data collected at testing points (hospitals, borders). The novelty of this work concerns (a) the design of a Finite Impulse Response (FIR) filter with coefficients related to the golden section (b) the design of a Steady State Kalman Filter with parameters related to the golden section, (c) the design of the FIR form of the Steady State Kalman Filter which does not require all the previous observations, (d) the applicability of the proposed filters in short term (daily) prediction as well as in long term prediction (quarantine period). In Section “Short term daily prediction” we present the classical mean or average filter as well as the proposed golden steady state Kalman filter for short term prediction, namely daily cases and deaths prediction for Covid-19; we also present simulation results. In Section “Long term average prediction” we present the use of steady state Kalman filter for long term cases and deaths average prediction, for example average prediction per quarantine period (14 days); we also present simulation results. The conclusions are summarized in Section “Conclusions”.

Short term daily prediction

The aim is to predict the Covid-19 new cases and deaths on a daily basis using previous observations (cases/deaths). Thus we need a measurement driven scalar model, where the measurement is the number of new cases or new deaths observed at time and the state corresponds to the number of new cases and deaths at time . Then the aim is to predict the number of new cases and deaths at time given the measurements till time , i.e. given the observations . The observations are assumed to be zero for negative time: . The prediction is the output of a filter, which has the observations in its input, as it is shown in Fig. 1 . In the remaining of this section, we are going to design various filters, including Kalman filter.
Fig. 1

Daily prediction using filter.

Daily prediction using filter.

Mean filter (MF) or average filter (AF)

The basic idea is that the prediction of daily cases/deaths can be computed as the mean (average) of previous observations. The prediction is the mean (average) of M last observations. This is a Moving Average filter MA(M-1) with M equal coefficients: Note that The MA filter is a Finite Impulse Response (FIR) filter. is the order of the MA filter. We name the filter defined by (1) with coefficients in (2) as Mean Filter (MF) or Average Filter (AF) due to the fact that the prediction is the mean (average) of the M last observations. M = 7 (1 week), M = 14 (2 weeks - quarantine time), M = 21 (3 weeks) are proposed in this case.

Golden FIR filter (GFIR)

The basic idea is that the prediction of daily cases/deaths can be computed using weighted previous observations. The prediction is The sum of the weights is The idea is to use M last observations. Each observation will contribute to the prediction with weight of the rest of the sum, where is the golden section:which is the positive solution of the equation Then the weights are:

The last weight results from the restriction that the sum of the weights equals to 1. Hence the weights are related to the golden section and the coefficients of (4) are: The derived filter is also a Moving Average filter MA(M−1) whose coefficients are: The contribution of the observations in the forecast decreases as the observations move away from the prediction time, in line with weights associated with the golden section. This MA filter is a Finite Impulse Response (FIR) filter. We name the filter defined by (4) with coefficients in (8)-(9) as Golden FIR filter (GFIR) due to the fact that the prediction results from a FIR filter with coefficients related to the golden section. M = 7 (1 week), M = 14 (2 weeks - quarantine time), M = 21 (3 weeks) can be used as in Mean Filter (MF) or Average Filter (AF).

Golden steady state Kalman filter (GSSKF)

The basic idea is that the prediction of daily cases/deaths can be computed using steady state Kalman filter. The general discrete time scalar linear model used to formulate the Kalman Filter (KF) consists of the dynamic and the statistical model. The dynamic model expresses the relationship between state and the measurement and is described by the following state space equations: for , with initial condition , where is the state vector, is measurement vector, is the state noise and is the measurement noise at time . The transition parameter describes the relation between two succeeded states. The output parameter describes the relation between the state and the measurement at the same time. Assuming that the state corresponds to the measurement, we get Assuming that the state does change very slowly from day to day, we consider that it does not change from step to step, so we get The statistical model describes the nature of state and measurements. The basic assumption is that a) the state noise is a zero mean Gaussian process with variance and b) and the measurement noise is a zero mean Gaussian process with variance . The following assumptions also hold: (a) the initial value of the state is a Gaussian random variable with mean and variance , (b) the noise stochastic processes and the random variable are independent. The discrete time Kalman filter [8] is the most well-known algorithm that solves the filtering problem, producing the state estimation and the corresponding estimation error variance as well as the state prediction and the corresponding prediction error variance . The state and measurement noise variances and concern a time period before the prediction time. In fact, is the variance of the difference of two succeeded observations and is the variance of the measurements for a time period before the prediction time. In [4] it was proposed that the noise variances can be computed on line for the time interval from the beginning till the prediction time or for a fixed backwards time interval before the prediction time. Then the noise variances are time varying and the Time Varying Kalman Filter is derived: for , with initial conditions and whereis the Kalman Filter gain. A variation results assuming that the noise variances are constant, i.e. and . The noise variances can be computed off-line for the time interval from the beginning of the disease till the beginning of producing predictions or for a fixed initial time interval determined by the previous pandemic wave. Then the noise variances are time invariant and the Time Invariant Kalman Filter is derived. In the following, we propose a model with constant noise variances . In this case, the Kalman Filter parameters are resulting in the random walk system. Then the prediction isand the prediction error variance is The prediction error variance can be computed iteratively by the previous equation, known as the Riccati equation [9]. The Riccati equation can be written as: The prediction error variance tends to the steady state prediction error variance [9] that satisfies the algebraic Riccati equation is: The algebraic Riccati equation can be written as: The positive solution is the steady state prediction error variance :where is the golden section in (6). Then, from (14), (24) the steady state Kalman filter gain is Thus the steady state Kalman filter gain is and is equal to the golden section. Then the Steady State Kalman Filter is derived: for , with initial condition , where as derived by the equalities in (25), (7). Thus, the Golden Steady State Kalman Filter (GSSKF) has been derived: for , with initial condition . The parameters of this Steady State Kalman Filter are related to the golden section. We are able to use zero initial condition or to use the last measurement before the prediction beginning as initial condition . This is an Autoregressive Moving Average filter ARMA(1,0) with coefficients: and We name the filter defined in (29) as Golden Steady State Kalman Filter (GSSKF) due to the fact that the prediction results from the implementation of a Steady State Kalman Filter with parameters related to the golden section.

Golden FIR steady state Kalman filter (GFIRSSKF)

The basic idea is that the prediction of daily cases/deaths can be computed using the FIR form of the steady state Kalman filter. The FIR form of the Steady State Kalman Filter (SSKF) can be implemented when [10]. Thus, the FIR form of the Golden Steady State Kalman Filter (GSSKF) can be implemented due to the fact that Without loss of generality, let . Then Working as in [10], let then Then It is obvious that this pattern holds for . Recall that the observations are assumed to be zero for negative time; then this pattern holds for . Thus, the FIR Steady State Kalman Filter (FIRSSKF) is derived: where The coefficients of the filter are related to the golden section. This is a Moving Average filter MA(M-1) with coefficients: The MA filter is a Finite Impulse Response (FIR) filter. We name the filter defined by (32) with coefficients in (33) as Golden FIR Steady State Kalman Filter (GFIRSSKF) due to the fact that the prediction results from the implementation of a FIR Steady State Kalman Filter with coefficients related to the golden section. Proposed M values are: M = 4 (), M = 7 (), M = 14 (), M = 21 (). Note that GFIRSSKF differs from GFIR in the last coefficient. The FIR implementation of the Steady State Kalman Filter requires the knowledge of a subset of previous time measurements to calculate the state estimate; there is no need of any previous estimates calculation [10]. Thus, the basic advantage of the FIR implementation of the Steady State Kalman Filter is that there is no need of all the previous observations.

Simulation results

The results presented are based on the publicly available data for Greece. The data used concern the new cases and the new deaths in Greece for the time interval from Feb 26, 2020 till June 14, 2020 [11]. The output of each filter (prediction) is corrected computing the ceiling of the prediction, in order to produce integer predictions (pessimistic scenario). Fig. 2 depicts the daily prediction of new cases in Greece using the Mean Filter (MF) or Average Filter (AF) of order M = 7 and M = 14, as well as using the Golden Steady State Kalman Filter (GSSKF).
Fig. 2

Daily cases prediction using MF and GSSKF.

Daily cases prediction using MF and GSSKF. Table 1 presents the mean percent absolute error and the mean absolute error prediction for new cases in Greece using MF, GFIR, GFIRSSKF with M = 4, M = 7, M = 14, M = 21 and GSSKF. The mean absolute error is computed as the average of the absolute difference between observation and prediction. The mean percent average absolute error is computed as the absolute difference between the average observation and average prediction divided by the average observation and multiplied by 100.
Table 1

Daily error cases prediction in Greece using MF, GFIR, GSSKF, GFIRSSKF.

mean percent average absolute error
MFGFIRGSSKFGFIRSSKF
M = 4 (4 days)0.44691.24481.34060.7980
M = 7 (1 week)0.09581.40441.34061.2448
M = 14 (2 weeks - quarantine time)1.40441.34061.34061.3406
M = 21 (3 weeks)3.03221.34061.34061.3406
mean absolute error

MFGFIRGSSKFGFIRSSKF

M = 4 (4 days)16.000015.440415.559615.3670
M = 7 (1 week)15.495415.522915.559615.5505
M = 14 (2 weeks - quarantine time)17.357815.559615.559615.5596
M = 21 (3 weeks)19.752315.559615.559615.5596
Daily error cases prediction in Greece using MF, GFIR, GSSKF, GFIRSSKF. Table 2 presents the mean percent absolute error and the mean absolute error prediction for new deaths in Greece using MF, GFIR, GFIRSSKF with M = 4, M = 7, M = 14, M = 21 and GSSKF.
Table 2

Daily error deaths prediction in Greece using MF, GFIR, GSSKF, GFIRSSKF.

mean percent average absolute error
MFGFIRGSSKFGFIRSSKF
M = 4 (4 days)20.879127.472528.571426.3736
M = 7 (1 week)22.527528.571428.571428.5714
M = 14 (2 weeks - quarantine time)24.175828.571428.571428.5714
M = 21 (3 weeks)25.274728.571428.571428.5714
mean absolute error

MFGFIRGSSKFGFIRSSKF

M = 4 (4 days)1.27661.36171.36171.3404
M = 7 (1 week)1.24471.36171.36171.3617
M = 14 (2 weeks - quarantine time)1.38301.36171.36171.3617
M = 21 (3 weeks)1.46811.36171.36171.3617
Daily error deaths prediction in Greece using MF, GFIR, GSSKF, GFIRSSKF.

Long term average prediction

The basic idea is to process blocks of measurements of a time window corresponding for example to the quarantine period in order to predict the average of cases and deaths using steady state Kalman Filter. Then long term prediction is derived, in the sense of predicting the average of states. So, the cases/deaths prediction concerns the prediction at time moment equal to the middle of the time window, that can be selected to correspond to a week, or a quarantine period. The length of the time window is denoted by , i.e. the average prediction is derived every (forward) days, for example 7 days (1 week), 14 days (quarantine period). Assume the time invariant model with parameters . Then Let us now use the average values of the state and measurement variables for every (forward) time instants, defining them respectively as: From (34) we get i.e. Then Hence where and Using (41) and we have: Also Hence where and Using (45) and we have: Hence the parameters of the state space model (per time instant for the average of time window of length ) are: . Then the algebraic Riccati equation is: and it is written as: The positive solution is the steady state prediction error variance : Then, the steady state Kalman filter gain is and Hence, the average prediction is We name the filter defined by (52) as Average Golden Steady State Kalman Filter (AGSSKF) due to the fact that the filter results from GSSKF used for daily prediction. Note that average prediction is derived every (forward) days and the steady state Kalman filter parameters depend on . In the case where N = 1 (1 day) the AGSSKF is GSSKF. N = 7 (1 week), N = 14 (2 weeks - quarantine time) can be used. For the FIR filters MF, GFIR, GFIRSSKF, form (1), (4), (32) we get the daily prediction as with coefficients , , , defined in (2), (8)-(9) and (33) respectively. We define the average values of the measurement variables for every set of measurements: Then the average prediction for the FIR filters MF, GFIR, GFIRSSKF is with coefficients defined in (2), (8)-(9) and (33) respectively. The data used concern the new cases and the new deaths in Greece for the time interval from Mar 16, 2020 till Oct 11, 2020 [11]. The prediction period is of 210 days (i.e. 30 weeks or 15 quarantine periods). Fig. 3 depicts the daily prediction of new cases in Greece using the Mean filter (MF) or Average filter (AF) of order M = 7 and M = 14, as well as using the Average Golden Steady State Kalman Filter (AGSSKF) with N = 1.
Fig. 3

Daily prediction of new cases in Greece using MF and AGSSKF.

Daily prediction of new cases in Greece using MF and AGSSKF. Fig. 4 depicts the average prediction of new cases in Greece using the Mean filter (MF) or Average filter (AF) of order M = 7 and M = 14, as well as using the Average Golden Steady State Kalman Filter (AGSSKF) with N = 7 (week) and N = 14 (quarantine period).
Fig. 4

Average prediction of new cases in Greece using MF and AGSSKF.

Average prediction of new cases in Greece using MF and AGSSKF. Table 3 presents the mean absolute error prediction for new cases in Greece using MF, GFIR, GFIRSSKF with M = 7, M = 14, as well as AGSSKF with N = 1 (day), N = 7 (week) and N = 14 (quarantine period).
Table 3

Daily and average mean absolute error for cases prediction in Greece using MF, GFIR, AGSSKF, GFIRSSKF.

MFGFIRAGSSKFGFIRSSKF
N = 1(1 day)M = 7 (1 week)28.682227.176727.184227.1859
M = 14 (2 weeks)33.355127.184227.184227.1842
N = 7(1 week)M = 7 (1 week)52.754427.523223.743327.5460
M = 14 (2 weeks)72.165027.534623.743327.5346
N = 14(2 weeks)M = 7 (1 week)74.983243.508832.258143.5281
M = 14 (2 weeks)83.588643.511232.258143.5112
Daily and average mean absolute error for cases prediction in Greece using MF, GFIR, AGSSKF, GFIRSSKF. Table 4 presents the mean absolute error prediction for new deaths in Greece using MF, GFIR, GFIRSSKF with M = 7, M = 14, as well as AGSSKF with N = 1 (day), N = 7 (week) and N = 14 (quarantine period).
Table 4

Daily and average mean absolute error for deaths prediction in Greece using MF, GFIR, AGSSKF, GFIRSSKF.

MFGFIRAGSSKFGFIRSSKF
N = 1(1 day)M = 7 (1 week)1.20571.31031.31031.3102
M = 14 (2 weeks)1.26661.31031.31031.3103
N = 7(1 week)M = 7 (1 week)1.35470.81960.80130.8192
M = 14 (2 weeks)1.66150.81960.80130.8196
N = 14(2 weeks)M = 7 (1 week)1.61591.06200.86151.0620
M = 14 (2 weeks)1.41031.06120.86151.0612
Daily and average mean absolute error for deaths prediction in Greece using MF, GFIR, AGSSKF, GFIRSSKF.

Conclusions

The aim of this paper was to develop prediction filters in order to predict the cases and deaths of Covid-19 in a daily basis (short term prediction) or in a quarantine period basis (long term prediction). Aiming the cases and deaths of Covid-19 daily predictions we have used a) the classical mean or average filter, b) the proposed Golden FIR filter (GFIR) with coefficients related to the golden section, c) the developed the Golden Steady State Kalman Filter (GSSKF) with parameters related to the golden section and d) the Golden FIR Steady State Kalman Filter (GFIRSSKF) with the advantage that is that there is no need of all the previous observations. The basic results are: prediction using MF becomes worse as M increases prediction using SSKF becomes better as M increases; there is no prediction improvement after some M the FIR form of the SSKF requires the knowledge only of a subset of previous time measurements to calculate estimate cases prediction using SSKF is better than MA prediction of order M = 14 in Greece the mean absolute error in Greece new deaths prediction is of the order of 1 death It was found that the proposed golden steady state Kalman Filter has a satisfactory behavior compared with the classical mean or average filter Aiming the cases and deaths of Covid-19 average predictions we proposed to process blocks of measurements of time window corresponding for example to the quarantine period. We designed the Golden Steady State Kalman Filter (GSSKF) with parameters related to the golden section. The basic results are: cases and deaths average prediction using SSKF is better than MA prediction MA prediction becomes worst as the time window increases the mean absolute error in Greece new deaths average prediction is of the order of 1 death the proposed golden steady state Kalman Filter produces more accurate predictions than the classical mean or average filter does Thus, the developed golden steady state Kalman Filter can be used in daily or average prediction producing reliable predictions. Hence, the use of steady state Kalman Filter for cases and deaths prediction of Covid-19 can be effective for resources and prevention measures planning.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
  5 in total

1.  Using the kalman filter with Arima for the COVID-19 pandemic dataset of Pakistan.

Authors:  Muhammad Aslam
Journal:  Data Brief       Date:  2020-06-12

2.  Forecasting Covid-19 Dynamics in Brazil: A Data Driven Approach.

Authors:  Igor Gadelha Pereira; Joris Michel Guerin; Andouglas Gonçalves Silva Júnior; Gabriel Santos Garcia; Prisco Piscitelli; Alessandro Miani; Cosimo Distante; Luiz Marcos Garcia Gonçalves
Journal:  Int J Environ Res Public Health       Date:  2020-07-15       Impact factor: 3.390

3.  Data-based analysis, modelling and forecasting of the COVID-19 outbreak.

Authors:  Cleo Anastassopoulou; Lucia Russo; Athanasios Tsakris; Constantinos Siettos
Journal:  PLoS One       Date:  2020-03-31       Impact factor: 3.240

4.  Application of the ARIMA model on the COVID-2019 epidemic dataset.

Authors:  Domenico Benvenuto; Marta Giovanetti; Lazzaro Vassallo; Silvia Angeletti; Massimo Ciccozzi
Journal:  Data Brief       Date:  2020-02-26

5.  Forecasting COVID-19 pandemic: A data-driven analysis.

Authors:  Khondoker Nazmoon Nabi
Journal:  Chaos Solitons Fractals       Date:  2020-06-25       Impact factor: 9.922

  5 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.