scieee AI-readable full text Open interactive document viewer

Leveraging geographically distributed data for influenza and SARS-CoV-2 non-parametric forecasting

Boullosa González, Pablo; Garea Espejo, Adrián; Area Carracedo, Iván Carlos; Nieto Roig, Juan José; Mira Pérez, Jorge

Abstract

The evolution of some epidemics, such as influenza, demonstrates common patterns both in different regions and from year to year. On the contrary, epidemics such as the novel COVID-19 show quite heterogeneous dynamics and are extremely susceptible to the measures taken to mitigate their spread. In this paper, we propose empirical dynamic modeling to predict the evolution of influenza in Spain’s regions. It is a non-parametric method that looks into the past for coincidences with the present to make the forecasts. Here, we extend the method to predict the evolution of other epidemics at any other starting territory and we also test this procedure with Spanish COVID-19 data. We finally build influenza and COVID-19 networks to check possible coincidences in the geographical distribution of both diseases. With this, we grasp the uniqueness of the geographical dynamics of COVID-19

Full text

Citation: Boullosa, P.; Garea, A.; Area, I.; Nieto, J. J.; Mira, J. Leveraging Geographically Distributed Data for Influenza and SARS-CoV-2 Non-Parametric Forecasting. Mathematics 2022,10, 2494. https://doi.org/10.3390/math10142494 Academic Editor: Ricardo Lopez-Ruiz Received: 1 June 2022 Accepted: 14 July 2022 Published: 18 July 2022 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Copyright: © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). mathematics Article Leveraging Geographically Distributed Data for Influenza and SARS-CoV-2 Non-Parametric Forecasting Pablo Boullosa 1, Adrián Garea 1, Iván Area 2, Juan J. Nieto 3and Jorge Mira 1,4,* 1Departamento de Física Aplicada, Universidade de Santiago de Compostela, 15782 Santiago de Compostela, Spain; [email protected] (P.B.); agar[email protected] (A.G.) 2CITMAga, Departamento de Matemática Aplicada II. E.E. Aeronáutica e do Espazo, Campus de Ourense, Universidade de Vigo, 32003 Ourense, Spain; ar[email protected] 3CITMAga, Instituto de Matemáticas, Universidade de Santiago de Compostela, 15782 Santiago de Compostela, Spain; [email protected] 4Instituto de Materiais (iMATUS), Universidade de Santiago de Compostela, 15782 Santiago de Compostela, Spain *Correspondence: jor[email protected] Abstract: The evolution of some epidemics, such as influenza, demonstrates common patterns both in different regions and from year to year. On the contrary, epidemics such as the novel COVID-19 show quite heterogeneous dynamics and are extremely susceptible to the measures taken to mitigate their spread. In this paper, we propose empirical dynamic modeling to predict the evolution of influenza in Spain’s regions. It is a non-parametric method that looks into the past for coincidences with the present to make the forecasts. Here, we extend the method to predict the evolution of other epidemics at any other starting territory and we also test this procedure with Spanish COVID-19 data. We finally build influenza and COVID-19 networks to check possible coincidences in the geographical distribution of both diseases. With this, we grasp the uniqueness of the geographical dynamics of COVID-19. Keywords: non-parametric modeling; flu; influenza; COVID-19; SARS-CoV-2; empirical dynamic modeling; forecasting MSC: 92-08 1. Introduction Influenza (or flu) is an infectious respiratory disease caused by the influenza virus. It results in an estimated 250,000 to 650,000 deaths annually [ 1 ]. Until 2020, influenza epidemics demonstrated a seasonal recurrence (Figure 1a), with a yearly pattern of exponential growth of infections, a marked peak, and a similarly prompt decay of new cases (Figure 1b). The width and magnitude of each outbreak varied moderately across years. These overall regularities [ 2 ] allowed a moderate success of different modeling approaches in forecasting outbreak magnitude and duration [3–6] . In late 2019, the emergence of the COVID-19 (the infectious respiratory disease caused by the SARS-CoV-2 virus) global pandemics disrupted the seasonal influenza pattern [ 7 ]. The fast spread and severity of the disease led to the enforcement of strong distancing measures around the globe, which halted the propagation of other, less aggressive respiratory viruses such as influenzas [ 8 ]. Contrary to the regularities observed in flu epidemics, COVID-19 data is very erratic. On the one hand, we do not know yet whether it will become a stationary disease—with patterns of infection growth and decay similar to those of flu. If that were the case eventually, we have not observed the new epidemics for a sufficiently long time yet as to infer repeated trends. On the other hand, while influenza is dealt with casually, the countermeasures to tackle COVID-19 have disrupted its natural Mathematics 2022,10, 2494. https://doi.org/10.3390/math10142494 https://www.mdpi.com/journal/mathematics Mathematics 2022,10, 2494 2 of 15 cycle. When these countermeasures were relaxed, new outbreaks emerged. This resulted in an irregular train of waves that often overlapped in time. As measures were dictated by an array of authorities (from local to supra-national), these waves differed wildly across regions—even within a same country (Figure 1c). Some biological aspects of SARS-CoV-2 contributed to the disarray: it presents a long incubation period [ 9 ] during which an infected person does not show symptoms; a large fraction of people suffer an asymptomatic version of the disease, but they can propagate the virus [ 10 ]; and, also, large outbreaks have been attributed to single super-spreaders who infected up to hundreds of people during a single event [ 11 ]. Under such conditions, tracking the exact timing of each infection is difficult—which resulted in unreliable epidemiological time series. Basque Country Community of Madri d Catalonia Oct. 2000 Oct. 2005 Jan. 2010 Jan. 2015 Jan. 2020 D a t e 0 200 400 600 Weekly incidence Jan. 1, 2020 May 20, 2020 Oct 7, 2020 Feb 25, 2021 D a t e 0 20 40 60 80 Daily incidence 0 10 20 30 W e e k 0 100 200 300 400 Weekly incidence a b c 1 January 2020 20 May 2020 7 October 2020 25 February 2021 Figure 1. Empirical time series of the influenza and SARS-CoV-2 epidemics. ( a ) Examples of historical time series of flu over 20 years in three Spanish regions: Basque Country (black), Community of Madrid (red), and Catalonia (blue). Data from each year (spanning from week 40 of a given year to week 20 of the next year) have been concatenated omitting the warm season (during which incidence is negligible). The gray area is expanded in ( b ) to show the yearly exponential raise, peak, and fall that characterizes the influenza cycle. Here, is data from 2015/16. ( c ) Evolution of the SARS-CoV-2 pandemics in the same three regions shows the pattern of waves within a single year, which are not always in phases across regions. The very mathematical nature of epidemic dynamics also hinders its forecasting [12]. A popular approach to this problem are compartmental models. In them, a population is coarse-grained into broad classes (e.g., Susceptible, Infected, and Recovered) and simple rules are established to regulate the flows between compartments. Typically, Infected people move into the Recovered class at a given rate, while they infect Susceptible individuals (moving them to the Infected compartment) with some probability. These rates and probabilities can be empirical model parameters inferred from the data. Such simple models can correctly capture broad qualitative aspects—e.g., a phase of exponential growth or the existence of herd-immunity thresholds. However, these models are notably bad at forecasting real-life scenarios. On top of all the troubles affecting data quality mentioned above, the phase of exponential growth in epidemic dynamics constitutes an important limiting factor. As it happens in deterministic chaos [ 13 ], small errors or uncertainties in the data are magnified exponentially by the epidemic dynamics themselves. Unlike chaotic systems, epidemic peaks can be fairly stereotypical; but the effect of exponentially magnified errors is enough to prevent a systematic and precise forecast of an outbreak’s magnitude and duration [ 12 ]. This exponential factor in epidemic dynamics results in broad ranges or parameters that can fit correctly past data, but that are compatible with wildly diverging future behaviors. In this framework, we have turned our attention to Empirical Dynamic Modeling (EDM) [ 14 ], a form of non-parametric modeling that looks at past examples of how a dynamical process (e.g., an epidemic) looked like, and uses them to forecast how it might unfold. Traditional EDM applications take a specific historic time-series (e.g., epidemic data of influenza in a French region [ 15 ]), then look at more recent data (say, the last 5 weeks of influenza cases in that same region) and find instances of the past series that resemble the new data. The known progress of the closest historical matches is used as an estimate for the evolution of the current situation. This avoids fitting empirical data to highly sensitive Mathematics 2022,10, 2494 3 of 15 exponential dynamics that magnify small errors. Instead, it relies on bounded, repeated trends of a same kind. Because of the issues around SARS-CoV-2 data outlined above, EDM seems still an unfit technique for the ongoing pandemic. The strong regularities observed in influenza mitigate some of these problems, making it an excellent test-bench for this approach. In an attempt to improve forecasting for the current pandemics, we expanded the classical functioning of EDM to leverage geographically distributed data. Instead of using a single historic time series to predict what might happen in a specific region, we studied a set of areas on which epidemics unfolded simultaneously, and allowed historical series from eachother to serve as examples of how the dynamics might progress. We first used influenza data from different Spanish regions to study a controlled scenario of known regularity. Through this controlled case, we quantified how much of an improvement our approach is with respect to earlier applications of EDM that did not leverage similar dynamics in geographically distributed data. We briefly explore the more difficult case of SARS-CoV- 2, in which data remains scarce and heterogeneity across regions is more pronounced. Our approach is moderately successful in capturing some features of the epidemics in different Spanish regions, while it fails in some important aspects. We propose that pooling geographically distributed data might speed up the gathering of recurring patterns, thus enhancing forecasting methods (beyond EDM) if COVID-19 becomes a seasonal disease. Finally, we turned EDM on its head to infer relationships between epidemic dynamics across different Spanish regions and over time. Since EDM uses past examples to forecast future dynamics, we quantified how often dynamical patterns from a region and year served as an estimate for each other’s unfolding. Thus, we derive networks that illustrate epidemiological patterns across regions and correlations between flu strains from different years. These might offer relevant information to track which are the closest patterns that new epidemics follow. 2. Materials and Methods 2.1. Data and Data Preprocessing We obtained time series of influenza cases from the Spanish National Center for Epidemiology (Instituto de Salud Carlos III). Out of 19 Spanish regions, we gathered data for 17 (which include 15 autonomous communities and the autonomous cities of Ceuta and Melilla). Data spans from 2000 to 2020, with some regions starting off at different times (as summarized in Table A1). Each time series starts at week 40 of a year and ends on week 20 of the next year—thus skipping the warm season in which influenza is uncommon. Raw data consists of weekly incidence per 100,000 inhabitants. This was smoothed with a 3-week moving average to mitigate sampling effects. We obtained COVID-19 time series from the same Instituto de Salud Carlos III. This data spans from the beginning of the epidemic to 19 April 2021. Raw data consists of the cumulative cases of COVID-19 in each Spanish region (all the Autonomous Communities, and the independent cities Ceuta and Melilla). We smooth the data with a 7-days moving average to mitigate sampling effects. From here, we derive daily incidence for each region and report it as number of cases per 100,000 inhabitants. Let us denote the time series of weekly (for flu) or daily (for COVID-19) new cases as x(t) , where t∈ {T0 , . . . , Tend} is a discrete index in units of weeks or days, respectively. Given data up to some time t, our task is to attempt a forecast for x(t0>t). Following the literature on EDM (our tool of choice), we will work with the discrete derivative of x(t): ∆x(t)≡x(t)−x(t−∆t). (1) We will base our forecast on this variable instead of on x(t) . This choice removes the effect of short-term linear auto-correlations [14]. Mathematics 2022,10, 2494 4 of 15 2.2. Empirical Dynamic Modeling Two approaches to forecasting stand out in the literature. On the one hand, modeling based on agents or equations try to capture the underlying causal processes behind a phenomenon (in our case, epidemic dynamics). Such causality is encoded by parameters— e.g., the likelihood that a contagious person infects someone else, or that he/she recovers from the disease. This approach allows us to understand a process and to test hypotheses to control it, but it is very sensitive to the array of problems discussed in the introduction. Non-parametric modeling, on the other hand, foregoes any attempt at understanding the mechanisms behind a phenomenon. These methods are more pragmatic—blindly seeking to extract as much useful information as possible to predict future scenarios. Little care is put on distilling this information into simple operating principles. Empirical Dynamic Modeling (EDM) [ 14 ] is a non-parametric forecasting technique. EDM builds a library of dynamical patterns observed in the past history of a time series. Then, an ongoing situation is matched to examples from this library. The evolution of the matching examples becomes an estimator of how the current situation might progress. This method has been used in epidemiology under alternative names, such as the “Method of Analogues” [15]. To the best of our knowledge, all applications of EDM base their forecast for an ongoing time series on examples drawn from its own past history. This does not help much for the current SARS-CoV-2 global pandemics, for which at most one year of very irregular data exists. However, the epidemics have unfolded simultaneously throughout the world, effectively generating parallel samples of the same process. Can we leverage this geographically distributed information? To do so, we expand EDM’s library of examples not only to the past of some ongoing dynamics, but to ongoing processes across different regions. Let there be a short time series: Y≡[y(t−nL+1),y(t−nL+2), . . . , y(t)]. (2) This usually consists of the last nL data points of an ongoing process, of which we wish to forecast the immediate future. The length of this short series ( nL ) will be chosen as explained below. Additionally, let there be a set of longer time series: ˜ Yr≡[˜ yr(Tr 0), . . . , ˜ yr(Tr end)]; (3) where the superscript r labels all available regions, and each corresponding series runs between times Tr 0 and Tr end (which might differ between regions). Let us call ˜ Y≡ { ˜ Yr} to the collection of all such series from all regions. ˜ Y constitutes our library of dynamic patterns, upon which we will base our forecast for the future of Y. To build this forecast, we first search for dynamical patterns in ˜ Y that resemble Y . We compute the Euclidean distance between Yand each stretch of length nLwithin ˜ Y: dr t0=snL ∑ i=1y(t−nL+i)−˜ yr(t0−nL+i)2, (4) where we have selected each suitable stretch from region r and labeled it with its ending time t0 . Note that both Y and each stretch of length nL within the library are a point in an nL -dimensional space. Equation (4) tells us how close to Y each point in the library is in this abstract space. Of all the examples available, we select the nB closest neighbors to Y . In this paper (and following suit with EDM literature [14]), we take nB≡nL+1. (5) Mathematics 2022,10, 2494 5 of 15 We denote the selected neighbors as {ˆ Yi ; i= 1, . . . , nB} . Alongside these examples we store htime steps into their future, such that: ˆ Yi≡ˆ yi(t0 i−nL+1), . . . , ˆ yi(t0 i),ˆ yi(t0 i+1), . . . , ˆ yi(t0 i+h). (6) Note that the index t0 i labels time differently within each selected example. We estimate the future h time steps ahead of the last point in Y as a weighted sum over the nearest neighbors: ˆ y(t+h)≡1 Z nB ∑ i=1 ωiˆ yi(t0 i+h); (7) where: Z≡ nB ∑ i=1 ωi(8) and: ωi≡e(−βdi/d0), (9) with di the Euclidean distance (as per Equation (4)) to the i -th neighbor, d0 the distance of the closest neighbor, and β a meta-parameter to be set as indicated below. Note that if β= 0, Equation (7) renders just the mean of the evolutions, while for β> 0 we assign more importance to points closer to Y. In the limit β∞ −→, only the closest neighbor contributes. 2.3. Meta-Parameters, Performance Evaluation, and Cross-Validation Back to our empirical time series, we will base our forecast on the observed ∆x(t) as defined in Section 2.1—so our library ˜ Y will consist of all such time series for a set of regions. Let us label the time series of region r as ∆Xr(t)≡ {∆xr(T0) , . . . , ∆xr(Tend)} , and say we wish to produce a forecast for this time series from some time t∈ {T0 , . . . , Tend} onwards. First of all, this region will be removed from ˜ Y (we would be cheating otherwise). Then, we take the shorter time series Y→ {∆x(t−nL+ 1 ) , . . . , ∆x(t)} ⊂ ∆Xr(t) , and proceed as indicated above. Note that this consists of the last data point before our forecast begins and the nL− 1 previous time-steps. We can repeat this process for all possible t to evaluate repeatedly how well EDM performs on a given region. Before we can do that, EDM presents two meta-parameters, nL and β , that need to be assigned a numerical value to operate. The meta-parameter nL determines the length of Y and that of the patterns within ˜ Y that Y is compared to. In principle, we wish to take nL as large as possible to find the most informative matches within ˜ Y . In the ideal case, we would find a pattern that completely matches ∆xr(t0) for all t0<t . In a realistic setup, an informative pattern might match up to a certain window in the past, and then diverge wildly from our ongoing time series. If nL is too large, we risk missing good patterns because of this—so we need to balance a tradeoff. The other meta-parameter, β , determines a non-linearity in weighting the neighbors of Y —as explained above. There is no principled way to set these parameters beforehand, so we tune them using cross-validation on all the data sets. To implement this cross-validation and measure the performance of our method, we use the correlation coefficient between our forecast and the empirical time series. Say we have generated a forecast of how Y will behave h time units (weeks for flu, days for COVID- 19) ahead, and that we have completed this for all possible t∈ {T0+nL , . . . , Tend −h} for a region’s time series. Then: ρr(h)≡Cov[y(t+h),ˆ y(t+h)] σ[y(t+h)]σ[ˆ y(t+h)] (10) Mathematics 2022,10, 2494 6 of 15 measures the correlation coefficient ( ρr(h)∈[− 1, 1 ] ) between the forecast and the actual data in this region; noting that y(t+h)≡∆x(t+h) , ˆ y(t+h) is given by Equation (7), and Cov[· , ·] and σ[·] indicate the covariance and standard deviation, respectively. We can obtain an average performance: ρ(h)≡hρr(h)ir, (11) where h·irindicates the average over regions. We find optimal values of EDM’s meta-parameters by repeatedly evaluating all regions with fixed nL and β (thus obtaining ρr(h ; nL , β) and ρ(h ; nL , β)≡hρr(h;nL,β)ir ), and selecting the combination (n∗ L , β∗) that renders a largest correlation. Optima values of the meta-parameters might depend on the forecasting horizon h , thus n∗ L≡n∗ L(h) and β∗≡β∗(h) . In our experiments, we evaluated EDM’s performance for nL= 1, . . . , 18, and β∈ {0, 0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 1, 1.5, 2, 5}. 3. Results 3.1. Pooling Geographically Distributed Information Enhances EDM Performance on Influenza Data We carried out a series of numerical experiments to test the performance of EDM with and without pooling together geographically-distributed information. This subsection reports results for flu data. Each experiment was carried out for a series of conditions that we label pool, classic, and annual. In the pool condition, we separated our influenza data series by seasons. To build forecasts for a region in a given season, the pattern library ˜ Y included past and future seasons from all regions (including the one being forecast), while the data from any region and the same season was removed from ˜ Y . Note, first, that including such future examples of the season being evaluated is standard in EDM [ 14 ]. We expect that the causality between a year and the next one is fairly broken. Second, imagine that an important region would present some idiosyncratic dynamics during a season, which is later replicated in some other areas. This trend could serve as an indicator of what might happen in those adjacent regions with some delay. If we include all data from a given season, EDM could draw the inference in the opposite direction as well (using data of adjacent regions to forecast dynamics that had played out some weeks ahead). This is why, to be on the safe side, we removed all data from all regions for the season being forecast. In condition classic, the library of patterns contained only examples from past and future seasons of a given region—which is how EDM was originally conceived [ 14 ] and how it has been applied, e.g., to forecasting flu trends in the past [ 15 ]. In condition annual, the library of patterns consisted of all the contemporary examples of a given region, ignoring all the examples from different years. This condition is proposed to measure the similarity between series from different regions in the same year, as the dominant flu strain will be the same and it might be possible for the effect of a region to be transmitted to a neighboring one within the same season. In Figure 2we represent the three conditions. In Figure 3we show EDM performance under the different conditions in a series of numerical experiments. If we keep h= 1 fixed, we are simply trying to predict the next amount of new cases following the available data. We see the performance on this task with optimal β∗ and varying nL in Figure 3a; and for optimal n∗ L and varying β in Figure 3b. In both plots, condition pool outperforms all others in almost all the ranges explored and, most importantly, it does so for the optimal n∗ L= 15 and β∗= 2 (even for the optima derived independently for all other conditions, marked by filled red circles). Such optima would be the meta-parameters with which we should operate if we tried to forecast new time series not present in our data set—and in all cases the results suggest that we should use condition pool. Condition annual performs slightly better than the classic EDM, and both fall below pool. This demonstrates an overall advantage of pooling together epidemiological data across regions. This result might have been expected, since the pool protocol provides us with more data in our training set. However, it is not trivial Mathematics 2022,10, 2494 7 of 15 that dynamics across regions (and, notably, having discarded series of a same season) would be informative to each other—each could have been affected by idiosyncratic factors such as population density, demographic structure, differences between urban and rural dynamics, etc. The most important features that we would like to predict in an epidemic episode are how many people will be affected and how long it will last. The maximum height and location in time of the peak are a first proxy. To study how well we can forecast this, in a second experiment we aligned the data from all seasons taking each peak as a temporal reference. Then, we looked at how good the forecast of this peak was if EDM only had data until τtime units (weeks in the case of flu) before. Figure 3c shows the average error (as relative and absolute magnitudes) that EDM makes in predicting the peak’s height. Figure 3d shows the error (in weeks) in predicting when the epidemics will reach its maximum. We appreciate that all protocols present quite similar curves. Thus, while pool produces better forecasts on average (as shown above), our results suggest that the uncertainty in predicting the magnitude and end of an epidemic process cannot be alleviated by more abundant data. This is in line with recent research [ 12 ] that shows how behind epidemic processes lie mathematical mechanisms that make them inherently unpredictable. Unfortunately, our non-parametric method cannot circumvent such problems. Looking at these plots with greater detail, we see how errors become smaller as we get closer to the actual peak—as might be expected (however, observe the case for COVID- 19). The smallest average error in magnitude happens as the data up to the very time of the peak is considered ( τ= 0), while location is better predicted a week before the peak happens ( τ=− 1). Error changes signs from negative to positive, meaning that EDM progresses (in average) from underestimating to overestimating. The forecast at τ=− 5 (which is the furthest from the peak that we can study with the available data) is more accurate than some others for peak magnitude and than many others for peak location. This effect is noteworthy for estimating peak location: this forecast degrades notably before becoming better—perhaps because the steepest phase of the exponential dynamics happens somewhere between τ=− 5 and τ=− 1. It is noteworthy, though, that this does not impact magnitude estimation as much. Region 1 Year 1 Year 2 Year 3 Year 4 Year 5 Region 2Region 3Region 4Region 5 Figure 2. Illustration of different data pools for EDM. In grey, the example we want to forecast, is the testing series. In blue, is the method we call classic, which uses as library of patterns all the examples of the same region. In pink, is the method annual, which uses as library all the examples from the same year. In green, is the method pool, where we use the biggest library, taking all the series that are not from the same region or the same year. Mathematics 2022,10, 2494 8 of 15 Relative magnitude error Absolute magnitude error [cases] -1 -2-3 -4 Absolute location error [weeks] 0 100 200 300 11 16 21 26 31 Community of Valencia Season week Number of cases 3 weeks 5 weeks Prediction ahead Pooling all geographical data Classic EDM Annual EDM ab 1 week Community of Madrid cde fg 0 100 200 300 11 16 21 26 31 0 -5 0.4 -0.4 0 -0.8 -1 -2-3 -4 0 -5 10 0 -10 -20 -30 0 2 4 -4 -2 2 4 6810 12 0 1 0.8 0.6 0.4 0.2 5 0123 4 2610 14 18 1 0.9 0.8 0.7 0.6 0.5 1 0.9 0.8 0.7 0.6 0.5 Season week Figure 3. Pooling geographically distributed information for influenza forecast. ( a – e ) Results of different numerical experiments for conditions pool (solid black curves, with shading indicating standard deviation), classic (solid red) and annual (dashed red). Filled circles in ( a , b ) mark the location of optimal meta-parameters for each protocol. The optima for pool are also marked by vertical solid lines. Solid horizontal lines in ( c – f ) mark the 0 of the vertical axis. Solid vertical lines in ( c – e ) mark the location of the peak in time. Dotted horizontal line in f marks ρ∗(h) = 0.5. ( a ) EDM performance (as measured by correlation between data and forecast) as a function of nL with fixed, optimal β∗ . ( b ) EDM performance as a function of β with fixed, optimal nL . ( c ) Average error in forecasting the peak magnitude. ( d ) Average error in forecasting the peak location. ( e ) EDM performance as we attempt to predict more time ahead. ( f , g ) Examples of how the forecast become worst as we attempt to predict with more anticipation. Real data (solid red curves) is compared to forecasts derived with one week (solid black), three weeks (dashed black), or five weeks (dotted black) of anticipation. The various shadings indicate standard deviation of the estimated quantity. (f) Forecasts for the Community of Madrid. (g) Forecasts for the Community of València. With time series aligned with respect to their peaks as in the previous experiment, we also measured EDM performance (as captured by correlation between data and estimate) as a function of τ . This way, we quantify how well our method works given that it is τ time units before or after the peak. Again, all protocols perform quite similarly in this experiment, with pool being notably worse than others in some cases. Figure 3e shows ρ∗(h= 1; τ) , which starts and ends close to 0 (i.e., forecast is of poor quality further away from the peak). Performance raises up to ρ∗(h= 1; τ)∼ 0.5 as the peak is approached, and remains at a similar level right after the peak before starting to decline gently. The dent at τ= 0 (performance becomes factually nil) is explained because the slope of the data series changes around the peak. Unless both data and prediction are perfectly synchronized (which, Figure 3d proves, is not the case), this leads to an average correlation of zero at that point. Finally, it is relevant to establish for how long a forecast remains informative. Figure 3e shows the EDM performance, ρ∗(h ; n∗ L , β∗) , as it tries to predict h time units ahead in time. Correlation remains above 0.5 for predictions up to 7 weeks ahead of the available data, with pool being the preferred protocol in most cases. (Protocol annual becomes better around the time that correlation drops below 0.5.) We show examples of how a relatively worse (Figure 3f) and better (Figure 3g) forecast degrade as we elaborate estimates with Mathematics 2022,10, 2494 9 of 15 more time in advance. We see how this forecast degrades rapidly for a specific season of the Autonomous Community of Madrid, while it remains quite stable for some other seasons in the Community of València. This, together with the large deviations around most of the measures reported in Figure 3(gray shadings), suggests that the right protocol might depend on the region studied, and that we might rather address this in a case by case basis. Below, we make some efforts to gain some insight about this issue. 3.2. Exploring EDM on COVID-19 Data Data of the COVID-19 epidemic dynamics are affected by the various sources of unpredictability discussed above—some related to the unanticipated emergency caused by the pandemics, some others related to intrinsic properties of this malady and our social interplay with it. We have attempted to use EDM, pooling distributed geographic information from various sources, to forecast the dynamic unfolding of this crisis. Our success differed between more global (incorporating data from countries around the world) and local (as in our example from Spanish regions) attempts, and it changed over time as the pandemic changed as well. In this section, we report a brief example based on the same regions as above, now studying only conditions pool and classic. While far from successful, this attempt at forecasting allows us to quantify some aspects that reveal how the new virus unfolds with dynamics very different from those of seasonal influenza. Our data series in this case give us new infections per day, instead of weeks, so some results do not translate as readily. Figure 4a shows the average EDM performance as a function of nL with fixed optimum β∗= 0. We see an optimum n∗ L= 7 (days), which is much smaller than the n∗ L= 15 (weeks) found in the case of flu. This reveals how much more changing are the dynamics for COVID- 19, and how informative patterns degrade more promptly as we attempt to compare them during longer stretches of time. This is indicative of a higher number of causal factors taking turns in dominating the dynamics—resulting in a more difficult forecast. Moreover, the correlation between estimates and prediction does not reach values comparable to those achieved with influenza data. Figure 4b shows EDM performance as a function of β with fixed, optimal n∗ L=7. Again, we see how the pool condition renders better results. We repeated the experiments to estimate the quality of peak forecast, but in this case taking into account that COVID-19 ‘waves’ are much more vaguely defined than seasonal peaks. Moreover, in some cases, EDM did not forecast the existence of a peak (suggesting, in turn, that the epidemics might grow unstopped within the time-window that we looked ahead). We report only results for cases in which a peak was predicted, and the comparison of its magnitude and location with that of an ongoing wave was possible. Figure 4c shows that the error in magnitude becomes fairly small around 5 days before the epidemic peaks. By that time, EDM can produce an accurate first proxy of what the number of affected people will be. However, Figure 4d shows that the error in location of this peak only grows as we become closer to it. This is opposed to the results for flu, for which both magnitude and location estimates improved as the peak was approached. This indicates that EDM is consistently forecasting maxima that lie further away each time in the future of the approaching target and, in other words, suggests that COVID-19 waves do not show tell-tale signs that they are turning—thus aggravating the unpredictability of these kinds of dynamics. The window of acceptable prediction capabilities is also much smaller for COVID-19 than for flu. Figure 4e shows how the correlation between estimate and data has already dropped below 0.5 if we attempt to predict 5 days ahead. This is an insignificant forecasting window compared to the acceptable 7 weeks that we could look ahead with a similar accuracy in the case of flu. This points, once again, to the dynamical challenge posed by the SARS-CoV-2 pandemics. Examples of forecast for the Community of Madrid (Figure 4f) and Community of València (Figure 4g) show very small deviations from their respective averages. This is due