4
VOLUME92, NU'vlflER 16 PHYSICAL REVIEW LETTERS week cnding 23 APRIL 2004 Real-Time Construction of Optimized Predictors from Data Streams Frank Kwasniok and Leonard A. Smith Department of Statistics, London School of Economics, London, United Kingdom (Received 13 May 2003; published 23 April 2(04) A new approach to the construction and optimization of local models is proposed in the context of data streams. that is, unlimited sources of data where the utilization of all observations is impractical. Real-time rcvixion of the learning set allows selective coverage of regions in state space which contribute most to reconstructing the underlying dynamical system. 001: IO.1103/Phy,l~evLett.92.164 101 tnrmdllclion.-Prcdicting the evolution of a dynami- cal system is a common goal in science. Often the under lying dynamical equations are unknown and only a time series of observations is available. In the case of deter- ministic dynamical systems, there are well-established methodologies [IJ based on state space reconstructions using local statistical models (e.g., local polynomial models) constructed from the observations. Given the fact that properties of noul inea r dynamical systems such as local curvature or the solution manifold and the local density of the invariant measure may vary enor- mously across state space, the question of optimizing such prediction schemes arises. Previous studies have opti- rnized local model structure [2J, and varied the complex- ity of the model (or data weighting) in a partitioned state space [3-5J. The present Letter considers the setting of a data stream, a continuing source of data such that retain- ing and processing all observations is impractical [6]. Our aim is to extract a learning data set of limited size optirnized in terms of predictive power either in the context of a data stream or for a huge observational database. Two conceivable applications among others are the prediction of turbulent gusts in surface wind velocities [7] and grid frequency. Our approach is contrasted with the traditional method in which the learning set is uniformly distributed with respect to the system's invariant measure. Our refined learning set adapts both tu local curvature and to local data density; it is illustrated in the context of local linear prediction using [he Ikeda m<lp. /·vlethodology.-Consider a data stream of scalar values {.I'll} measured at equally spaced times {It,}. The (un- known) underlying dynamical system may be either a discrete map or a continuous flow. 'Ne restrict atteu- tion to a single-channel measurement for simplicity; gen- eralization to a multichannel situation is straightforward. The prediction problem at time In consists of predict- ing S.1+ 1 from an m-dimensional time-delay vector (sn-"' ...j •••• , sn) (see [1]). Let '~n+1 denote the predicted value as opposed to the observed value S,,+I' We consi- der local linear ruodeling. that is, S,,+I"= an + 164101-1 0031-9007/04/92(16)/164101(4)$22.50 PACS numbers: 05..15.Tp, OS.4S.Ac Li:; a,s,,-m+l' where the prediction coefficients {aJ;:o are determined by least-squares regression Oil rhe points in some neighborhood of (s"'-m+j, ... , s,,). These neigh- bors in delay space are chosen from a learning data set of prescribed size N, collected at times prior to t.; Denote the learning set by L = {(x"., Y")}~~I with x, = (slJ«-m+ I ... " snn) and ..v{) = Snu +1, A traditional learning set, hereafter £0, consists of N points distributed uniformly in time (say, fI" .~~ a + m- I), and thus (rough ly) according to the invariant measure. We take £0 as a starting point for our learning set, L (that is, L = £0 initially), and then refine L keeping N fixed via the following algorithm. (1) Read the next point (v. 11') from the data stream, where v = (snl- m{ I,··", "/'11) and HI =. 51,,'+1- (2) Calculate the prediction ,~"II 1 based on the current refined learning set L and the absolute prediction error e' = !sn'+ I- sr.'+ 11. 0) Draw a point at random from L, each point being equally likely, and denote it as (x"., Ya')' (4) Calculate the prediction s" •.•. 1 with the learning set £+=£U{(v,w)}\{(x".,y,y.)}"[that is, include (v,w) while excluding (x"" Ya")] and corresponding prediction error e" = ISn .+ I- Sn .+tI· (5) If e" < ~I then exchange (x"" )'0 0 ) for (v, 11'), that is take L" as the new refined learning set; otherwise do not alter L. Proceed to Step (I). This algorithm aims to selectively include points in L from regions in reconstruction space with the largest errors, at the cost of removing points in regions where prediction is relatively good; it immediately generalizes to analogue prediction, higher order local polynomial prediction, or other local models. The ultimate precision of the model is limited by technological constraints, effectively the value of N. The algorithm can be run indefinitely. Let p denote the exchange probability, that is, the probability that a new point is included in L. Let p(cj be the probability distribution of out-or-sample abso- lute prediction errors at some stage of the algorithm and eNe) the corresponding cumulative disrrihution, © 2004 The American Physical Society 164101-]

Real-Time Construction of Optimized Predictors from Data

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Real-Time Construction of Optimized Predictors from Data

VOLUME92, NU'vlflER 16 PHYSICAL REVIEW LETTERS week cnding23 APRIL 2004

Real-Time Construction of Optimized Predictors from Data Streams

Frank Kwasniok and Leonard A. SmithDepartment of Statistics, London School of Economics, London, United Kingdom

(Received 13 May 2003; published 23 April 2(04)

A new approach to the construction and optimization of local models is proposed in the context ofdata streams. that is, unlimited sources of data where the utilization of all observations is impractical.Real-time rcvixion of the learning set allows selective coverage of regions in state space whichcontribute most to reconstructing the underlying dynamical system.

001: IO.1103/Phy,l~evLett.92.164 101

tnrmdllclion.-Prcdicting the evolution of a dynami-cal system is a common goal in science. Often the underlying dynamical equations are unknown and only a timeseries of observations is available. In the case of deter-ministic dynamical systems, there are well-establishedmethodologies [IJ based on state space reconstructionsusing local statistical models (e.g., local polynomialmodels) constructed from the observations. Given thefact that properties of noul inea r dynamical systemssuch as local curvature or the solution manifold and thelocal density of the invariant measure may vary enor-mously across state space, the question of optimizing suchprediction schemes arises. Previous studies have opti-rnized local model structure [2J, and varied the complex-ity of the model (or data weighting) in a partitioned statespace [3-5J. The present Letter considers the setting of adata stream, a continuing source of data such that retain-ing and processing all observations is impractical [6]. Ouraim is to extract a learning data set of limited sizeoptirnized in terms of predictive power either in thecontext of a data stream or for a huge observationaldatabase. Two conceivable applications among othersare the prediction of turbulent gusts in surface windvelocities [7] and grid frequency.Our approach is contrasted with the traditional method

in which the learning set is uniformly distributed withrespect to the system's invariant measure. Our refinedlearning set adapts both tu local curvature and to localdata density; it is illustrated in the context of local linearprediction using [he Ikeda m<lp.

/·vlethodology.-Consider a data stream of scalar values{.I'll} measured at equally spaced times {It,}. The (un-known) underlying dynamical system may be either adiscrete map or a continuous flow. 'Ne restrict atteu-tion to a single-channel measurement for simplicity; gen-eralization to a multichannel situation is straightforward.The prediction problem at time In consists of predict-ing S.1+ 1 from an m-dimensional time-delay vector(sn-"' ...j •••• , sn) (see [1]). Let '~n+1 denote the predictedvalue as opposed to the observed value S,,+I' We consi-der local linear ruodeling. that is, S,,+I"= an +

164101-1 0031-9007/04/92(16)/164101(4)$22.50

PACS numbers: 05..15.Tp, OS.4S.Ac

Li:; a,s,,-m+l' where the prediction coefficients {aJ;:oare determined by least-squares regression Oil rhe pointsin some neighborhood of (s"'-m+j, ... , s,,). These neigh-bors in delay space are chosen from a learning data set ofprescribed size N, collected at times prior to t.; Denotethe learning set by L = {(x".,Y")}~~I with x , =(slJ«-m+ I ... " snn) and ..v{) = Snu +1,A traditional learning set, hereafter £0, consists of N

points distributed uniformly in time (say, fI" .~~a + m -I), and thus (rough ly) according to the invariant measure.We take £0 as a starting point for our learning set, L(that is, L = £0 initially), and then refine L keeping Nfixed via the following algorithm.(1) Read the next point (v. 11') from the data stream,

where v = (snl- m{ I,··", "/'11) and HI =. 51,,'+1-

(2) Calculate the prediction ,~"II 1 based on the currentrefined learning set L and the absolute prediction errore' = !sn'+ I - sr.'+ 11.0) Draw a point at random from L, each point being

equally likely, and denote it as (x"., Ya')'(4) Calculate the prediction s" •.•. 1 with the learning set

£+=£U{(v,w)}\{(x".,y,y.)}"[that is, include (v,w)while excluding (x"" Ya")] and corresponding predictionerror e" = ISn .+ I - Sn .+tI·(5) If e" < ~I then exchange (x"" )'00

) for (v, 11'), that istake L" as the new refined learning set; otherwise do notalter L. Proceed to Step (I).This algorithm aims to selectively include points in L

from regions in reconstruction space with the largesterrors, at the cost of removing points in regions whereprediction is relatively good; it immediately generalizesto analogue prediction, higher order local polynomialprediction, or other local models. The ultimate precisionof the model is limited by technological constraints,effectively the value of N. The algorithm can be runindefinitely.Let p denote the exchange probability, that is, the

probability that a new point is included in L. Let p(cjbe the probability distribution of out-or-sample abso-lute prediction errors at some stage of the algorithmand eNe) the corresponding cumulative disrrihution,

© 2004 The American Physical Society 164101-]

Page 2: Real-Time Construction of Optimized Predictors from Data

week endinQ23 APRIL 20tHVOLUME 92. NUMBER 16 PIIYSICAL REViEW LETTERS

while p*(s) and <T)*(£) denote the corresponding in-sample distributions. The exchange probability is thenp ~ J~ p(e)(P*(f:) cif: and, since p and 1'* are ini-tially the same, the Initial exchange probability isPu = J~ p(r:)<!>(f:) de = 4. independent of the distribu-tion, Depending nu uperatimml constraints, one could, ofcourse. repeat steps (:1), (4). and (5) above, thereby testingeach new point against several in L and increasing theprobability of changing L In the cases presented below,this modification had little effect and is not pursuedfurther in th is Letter.

Results. We illustrate the methodology with the Ikedamap [iI]. In the complex plane, the map is Z,l+1 = P +Bz" exp[i(K - [(4(1 + Iz,.I"l])], with p = 1, B = 0.9,K = 0.4, and (J == 6. The data stream consists of thescalar observable s" = Re(ZI1), generated by numericaliteration of the map. In the noise-free case, local linearmodels were constructed from time-delay vectorsformed with m >= 4 using K 10 nearest neighbors: KIS then twice the number of free parameters in themodel. We use the Euclidean norm throughout. The vari-ance or the prediction error is drastical ly enhanced byoccasional Ill-conditioned fits. Eigenvectors of thepredictor-predictor co variance matrix corresponding toeigeuvalues smaller than 10-5 times the largest eigcn-value were omitted in the noise- free case (in the caseswith observational noise discussed below, only the threelargest eigenvalues were included) [9).

The results shown are means over 40 independentrealizations using different data streams; also the initiallearning sets and the test sets differed in each realize-iion. Figure I outlines the one-step ahead performanceof the algorithm with N = 1500. The mean absolute(MA) error and the root mean square (rrns) error aregiven as a function of k, the number of points processedafter the initial learning set. Thus, k ,= 0 correspondsto the traditional learning set Lo. Both the MA errorand the rms error are calculated out-of-sample using5000 points. Sampling fluctuations in the estimatedlVIA and rms errors were of order 0.0001; hence, thevisible differences are almost entirely due to the twodifferent algorithms used. Figure 1 shows the meanerror and the central interval containing 95'1'" of therealizations. The mean prediction error of a learningset consisting of all IV + k data points is also shown asan indication of ideal model performance; in realisticapplications with large k this comparison is imprac-tical. Initially, both the MA error and the rrns errordecrease rapidly as the algorithm proceeds, saturatingafter about 10 000 and 15000 points, respectively. hav-ing dropped by 5 I 'J,.; and 74%, respectively, Moreover,0\11 algorithm has the additional advantage that the vari-abililY of both quantities between di Iferen: realiza-lions decreases with increasing k. Note that, with respectto rms error, the refined method remains fairly closeto the learning set retaining all the available dara;

164101-2

0.02

ea;0.015c

'3'0'".0 0.01"c'"OJE

0.005

00

0.1

2 0.08G>

'"(;j 0.06'"er'"cro 0.04'"E'0e 0.02

00

0.6

0.5

a

10000 20000points processed after initialloarning sot

b

10000 20000points processed after initial learning set

c

0.2

o 1(XlCIO 20000point. processed after in'tiallearring set

0.1~, ..,......~.~

\. _.- - - ._.-

d

2ill:!! 0.08'"::>er'"c~

0.06

'02. 0.04

002. L..~~_~_C-L~~_~_~..L.....~~...Jo 10000 20000

polnts processed after inilia! learning set

FIG. 1. Mean absolute error (a), rms error (b), and exchangeprobabitity (c) as a CUfl(:lioll of k for one-step prediction withN= 1SOO. Dotted curves reflect error when keeping all obscr-vations. The. error; n the traditional method is denoted by thehorizontal dash-dotted line. Solid, dotted, and dash-dottedcurves are means over 40 realizations; dashed curves capturethe central 95'k· of the distribution rrns error (d) with 2%observational noise on the data stream.

16410] -2

J

Page 3: Real-Time Construction of Optimized Predictors from Data

week eud i.ug23 APRIL 2004VOLUME 92. NUMBER 16 PHYSICAL REVIEW LETTERS

the refined learning set with N = 1500 points yieldsforecasts with accuracy similar to that of Cl traditionallearning set a factor of 7 larger (10500 points),

Figure 2 illustrates the evolution of the cumulativedistribution of absolute prediction errors, The distributionof errors obtained with Lo is contrasted with that reachedafter 1500 (k = N), 15000 (k = 10N), and 30000 (k =20N) additional observations. Large errors decreasegreatly and small errors increase slightly, converging indistribution after about 15000 points. The refined learn-ing set L provides a more homogeneous error distributionand substantially reduced mean error which would almost.always be preferable to that of Lu.

Figure 3 contrasts both the one-step a nd the (iterated)two-step forecast quality of models using Lo with that ofmodels using L at k = 201\1 (when the error distributionhas stabilized). The ratio between the forecast error usingL and that using Lo is plotted as it function of N for threeerror measures: the MA error, the rrns error, and the 90%quantile of the error distribution. With N = 50nO, therefined method improves the one-step MA error by 57%while the rms error is reduced by 87%; as shown, asignificant reduction remains at two steps. With N =

1500, L maintains a systematic advantage over Lo asthe forecasts are iterated into the future (not shown); atone, two, three, and four steps, the rrns error is reduced by74%, 49%, 15%, and 4%, respectively. As expected,larger values of N enhance these reductions. as well asintroducing significant reductions at longer lead times.

There remains the question of noise. Given a datastream contaminated with additive Gaussian noise (er ~.~0.0097, correspondi ng to a noise level of 2%). local linea rmodels were formed by using the ten nearest neighborsand all other points (if any) within a distance of $leT. ForN = 1500, Fig. J(ci)illustrutes that by k = 10000 the rrnserror has saturated ut a value 29% below that of Lo.

o L-__~ __-L ~ __~ __~ __~ __~

o 0.Q1 0.02absolute error

0.040.03

FIG. 2. Cumulative probability distribution of one-step abso-lute prediction errors for N = 1500 with k = ()(solid line). k =1500 (dashed line), k: = 15 000. (dush-doncd line). and" =

3()()()O (dotted line). Each curve represents an average over 40realizations.

164101-3

Iterated forecasts again show i rnprovement: in the noisycase using L with N= I SUO yields reductions of rrnserror by 29%, 22tk, 14%. and 5'70 at one. two, three, andfour steps, respectively. Even at only i'OUT steps ahead,rms and MA error are misleading tools for model evalu-ation; evaluating probabilistic forecasts or shadowingti rnes yields more insight [10 J. Nevertheless, these sys-temaiic forecast improvements are substantial, indicatingthat our method captures the dynamics of the systemnoticeably better than the t radit ional approach.

In its present form, the algorirh m has no mechanism todistinguish whether a large prediction error is due to localnonlinearity or a particularly noisy observation. He lice ,the aJgorithm is expected to accumulate observationswith extreme realizations of the noise. This is indeedvisible at k = SO O(X) (not shown). An elegant solutionto this problem is under investigation; however, simplymonitoring the prediction error over a large windowprovides a simple slopping criterion. Alternatively. rea-SOilS for not employing any stopping criteria arc consid-ered below. In any event, the algorithm is robust to lowlevels of additive noise.

0.7

0.6

O.S0.~ 0.4g

0.3o

0.2

0.1

00

0.90.8

0.7

0 0.6~ 0.5g 0.4'" 0.3

0.2

0.1

00

40003000 50001000 2000

b

3000 4000 50001000 2000N

FIG. 3. Ratio of prediction errors or the refined method to thetraditional method as a function of N for one-step (a) and two-step iterated (b) prediction .showing mean absolute error (solidline). rills error (dashed line). and 90% quantilc of absoluteerror (dotted line).

164101-3

Page 4: Real-Time Construction of Optimized Predictors from Data

VOLUME 91, NUMBER 16 FHYSICAL REVIEW LETTERS week cndina23 APRIL 2()04

Discussion. - We have shown that learning sets thatselectively sample state space can improve prediction.This approach is complementary to methods which ex-plicitly partition the state Sp<:lCC and either (i) increase thecomplexity of the model in poorly forecast regious bygrowing cell structures l4j, using cluster-weighted IlH.J-

els [51 or employing multiple models, or (ii) fix tbe modelcomplexity and rcwcight the: data [3]. Network ap-preaches [4,5] have the advantage that clustering (orvector quantization) offers efficient noise reduction.Altematively, the high degree of locality inherent tonearest-neighbor schemes yields a very high effectivemodel complexity which is an advantage, as long as it isnot employed to fit the noise. i\ systematic comparison ofthese approaches is desirable.

Another advantage of local models is the easewith which they can be updated by merely changing thelearning set. Our method is easily generalized to con-sider the age (or the expected value of inclusion) of apoint in L, allowing application to non stationary sys-tems. including those undergoing gradual parametershifts, as well as nddressmg the noise issues above. Byconstruction, our method continuously adapts the learn-ing set to the system.

We have introduced a general method for refining localmodels of data streams, and demonstrated improvedshort-term prediction. We hope this approach will proveuseful in practice I appl ication.

Wc thank P. E. MeSharry and K. .ludt! for detaileddiscussions and implemeutations of earlier algorithms.

161101·4

[J] J. D. Farmer and J.1. Sidorowich. Phys Rev. Let!. 59,845 (l987); G. Sugihara and R. M. May, Nature(London) 344, 734 (1990); T. Saner, J. A. Yorke,and M. Casdagli, J Star. Phys. 65, 579 (1991);H. D. L Abarbancl, R. Brown, J. J. Sidorowich, andL S. Tsunr ing, Rev. Mod. Phys. 6S. 13:\1 (1993):H. Kantz and T Sch reiber. Nonlinea r Time SeriesAnalysis (Cambridge University Press, Cambridge,England; 1(97).

(2) LA. Smith. Philos. Truns. R. Soc. London. Set A 348,371 (1994); EM. Bollt, Int, J. Bifurcation Chaos Appl.ScL Eng, 10, 1407 (2000); !<. Judd andM. Srnall, Physicu(Amsterdam) 136D, 31 (2000).

[J] LA. Smith, Physica (Amsterdam) 581). 50 (1992).[41 n. Fritzkc, Neural Networks 7, 1441 (1994).151 N. Gershenfeld, B. Schoner, and E. Metois. Nature

(London) 397, 329 (1999).[6] P. E McSharry, Ph.D, thesis, Oxford. J(99).[7] M. Ragwitz and H. Kanlz, Europhys. Leu, SI, 595

(2000)[81 K. Ikeda. Opt Corumun. 30, 257 (1979).(9) Predictions outside the observed range were re-

scaled; Those smaller than Smin = -·-1 or larger thanSe", = 2.5 were set to SOli" and Sn", , respectively.This tends (0 underestimate (he relative value of ourapproach.

[10) C. Grebogi , S. M. Hamrncl, 1. A York<:, and T. Sauer,Phys. Rev. Lett. 65, 1527 119(0); T. Palmer, Rep. Prog.Phys. 63, 71 (2000); L. A Smith, in Nonlinear Dynamicsand Statistics. edited by A 1. Mees (Birkhauscr, Boston,2000); M. S. Roulston and L A Smith, Mall. WeatherRev. 130. lG53 (2002).

164101-4