Grassberger-Procaccia algorithm
From Scholarpedia
| Peter Grassberger (2007), Scholarpedia, 2(5):3043. | revision #12313 [link to/cite this article] | |||||||||||||||||||
Revision as of 17:41, 1 May 2007; view current revision
←Older revision | Newer revision→
Curator: Peter Grassberger, John von Neumann Institute for Computing, Jülich, Germany
Basic Definitions
The Grassberger-Procaccia Algorithm is used for estimating the correlation dimension of some fractal
measure
from a given set of points randomly distributed according to
. Let
the
points be denoted by
, in some metric space with distances
between any pair of points. For any positive number
, the correlation sum
is then defined as the fraction of pairs whose distance is smaller than
,
- (1)
where
is the Heaviside step function. It is an unbiased estimator of the
correlation integral
- (2)
Both
and
are monotonically decreasing to zero as
. If
decreases like a power law,
, then
is called the correlation dimension of
.
Formally, the dimension is defined by
. The term ``GP algorithm" is used generically for any algorithm which
attempts to estimate
(and more generally
) from the small-
behavior of
, in particular when the input data are in form of a time series.
Because this involves an extrapolation to a limit where the statistics is severely
undersampled for any finite
, this is an inherently ill-posed problem. The simplest
and most naive way to estimate
is to plot
against
on a log-log plot and to
fit a straight line to the small-
tail of the curve.
is then the slope of this line
(see Fig. 1). More sophisticated methods involve e.g. fitting local slopes
and extrapolating them to
, or the method proposed in (Takens 1985, Theiler 1988).
Main Application: Chaotic Dynamical Systems
Although the GP algorithm can be used for any measure (the basic idea had been used before
to estimate dimensions of fractal clusters created by diffusion limited aggregation (Witten and Sander 1981)),
it is mostly used to measure the fractal dimensions of a strange attractor from a
univariate (i.e. scalar) time series which is denoted as
. Now,
represents
a measurement of the quantity
at time
. We assume stationarity,
i.e. the statistics of the set
is invariant under time translation. Unless the
measurements are i.i.d., there will be correlations between successive measurements. But
they will be weak and short-ranged, if the data are produced by a chaotic system, i.e.
if they are sampled from a trajectory on a strange attractor (or strange repeller). In that
case, and if
is sufficiently big, one can assume that the data are effectively independent
and randomly sampled from the invariant natural measure on the attractor, and one can
directly take over Eqs.(1) and (2). Furthermore, using Takens' time delay
embedding theorem (Takens 1981, Packard et al. 1980) and its improvements (Sauer et al. 1991), one can replace a series
of
univariate measurements by a time series of
delay vectors
- (3)
where
is the embedding dimension. Estimating the dimension of attractors by
using Eqs.(1) with delay vectors, and using Euclidean distances in delay vector
space, was first proposed in (Grassberger and Procaccia 1983a). An equivalent algorithm with maximum instead of
Euclidean norm had been proposed independently in (Takens 1982).
One of the main applications of the GP algorithm is to distinguish (in principle) between
stochastic and deterministically chaotic time sequences. For a stochastic signal,
for all
. In contrast,
for
larger than the attractor
dimension, if the signal is generated by a deterministic system. Notice that in both cases
the Fourier spectrum is continuous, and thus cannot be used to make this distinction.
In practice, the distinction based on
is often not possible either, due to
experimental noise, finiteness of
, non-stationarity and intermittency effects, and
due to the uncertainties involved in the extrapolation
. Many of these issues are
discussed in the review by Theiler (1990). It seems fair to say that
a large fraction of the relevant literature is questionable, because authors have underestimated
these problems in view of the simplicity of the GP algorithm's implementation.
Relations to Other Dynamical Invariants and Multifractality
Let us denote by
the correlation integral obtained with embedding dimension
.
Then the typical behavior for
for a chaotic system with attractor
dimension
is
where
is the order-2 Renyi entropy,
a proxy for the Kolmogorov-Sinai entropy. Thus the GP algorithm can be used also to
estimate dynamical entropies (Grassberger and Procaccia 1983b) (see Fig. 1).
The basic idea of the GP algorithm, namely to estimate a dimension from the statistics
of near neighbors, can be implemented also in other ways. For instance, one can define
pointwise dimensions
by counting for each
the fraction
of
points which are
-close neighbors of
and fitting it to a power law. Alternatively,
one obtains the information dimension
by fitting a power law to a geometric average,
. Or, more generally, one can define non-linear
averages by
. Notice that
. If
, then
and
are called
order-
Renyi dimensions and order-q dynamical entropies. Thus
is also called
, the order-2 Renyi dimension.
Measures for which
is independent of
are called monofractal, those with non-trivial
-dependence are called multifractal (Hentschel and Procaccia 1983, Grassberger 1983, 1985, Halsey et al. 1986).
All
and
are (metric)
invariants, i.e. their values do not change when the metric
is replaced by
some other metric, or when
with smooth and invertible
. While the
most interesting invariants for certain theoretical
analyses are those with
, invariants with
are easiest to measure because,
for finite
,
has twice the dynamic
range of other
functions, which means the small
limit is more effecively probed.
Computational Complexity Aspects
Typically, one wants to obtain
for
different values of
(equally
spaced on logarithmic scale) and for
different values of
. Naive evaluation of
Eq.(1) requires then
operations. With e.g.
(rather modest requirements), this is already a non-trivial task on a fast PC. The most
obvious improvement is obtained by binning
logarithmically and storing
in separate entries of a histogram. This reduces the complexity to
. Next, one
can treat all values of
in a single run, which reduces the
dependence to
. This
can be further reduced to a weaker than linear increase with
(at least for intermediate
values of
), if one replaces the double sum over
and
in Eq.(1)
by a sum over
and
.
For a fast implementation using also some other shortcuts, see (Widman et al. 1998).
For very large
one can reduce CPU time further by noticing that it is mainly the
small
tail of
that is of interest. By preprocessing the data (using
e.g. grids and taking pairs of points only from neighboring boxes) one can avoid counting
pairs with large
, obtaining substantial improvements (Schreiber 1995).
``Optimal" Choices for Delay and Embedding Dimension
There exists a large literature which attempts to determine optimal choices for the delay
and for
. The delay is often chosen such that some measure of dependence
(e.g. mutual information) between successive coordinates
and
of delay vectors
has a local minimum. More precisely, one wants to avoid the case where
all
components are too dependent. In fact, these two requirements are in general mutually
exclusive (Grassberger et al. 1991). Also, there are in general no optimal values of
and
separately, but only for the product
. The reason is
simply that adding more measured values cannot be detrimental (at least if the data are not
too noisy, if the maximum norm is used, and if one has enough computing power). The only
general advice one can give for
and for
is to avoid values for which
has a local minimum, because that means that
such a choice cannot resolve all effective degrees of freedom, as they would be seen with
other, nearby, choices (Grassberger et al. 1991).
Non-Stationary Signals and Theiler Correction
When applying the GP method to time sequences, one should remember that its justification
hinges on the assumption that all points
are independent apart from being
distributed according to the same invariant measure. In particular, there should be no
significant time correlations.
This is manifestly and grossly violated, if the system is not stationary. In that case
a main reason for two points
and
to be close neighbors in space
might be that they are also close in time, as is most clearly demonstrated by (ordinary
or fractal) diffusion (Osborne and Provenzale 1989), and by data with a strong linear trend. Neglecting this has been one of the most common reasons for wrong
claims for small attractor dimensions. Fortunately, there is an easy way to test against
this danger: Plot all pairs
with
against
, and check that they don't cluster at small
(more precisely, the
density of these points should be
). More
common tests for stationarity are less useful, as they are sensitive to the bulk of
the data and not only to the tiny fraction of small distance pairs.
Even for stationary systems, pairs with very small
will not be independent
and should thus be excluded from the analysis. As suggested by Theiler (Theiler 1990),
this is done by defining a generous upper limit
to the correlation time, and
replacing Eq.(1) by
- (4)
Intermittent, Noisy, and Stochastic Time Sequences
Experimental data are usually noisy and often intermittent. Strong intermittency
poses a practical problem, in that it implies a large time scale over which the
signal does not look stationary. It also leads often to very inhomogeneous invariant
measures, so that any scaling law is likely to show very large corrections. Finally,
it usually implies a strong dependence on the order
, so that
is a bad
proxy for the more interesting information dimension
.
Low amplitude and high frequency noise (the most common case) leads to deviations
from scaling behavior at small
. In the ideal case, it fills the available phase
space, and thus
below the noise level, with
above. In this case the estimation of
is more difficult but still possible.
The worst case is when a separation into noise and deterministic signal is no
longer possible. In this case, looking for scaling behavior is no longer adequate.
But studying
can still be useful for rejecting null models,
such as AR and ARMA models popular e.g. in economy (Brock et al. 1996). Another application
of
is to EEG analysis. There, even if estimates of ``dimensions" are
usually misleading, the shape of
can systematically depend on mental
states which might not be easily distinguished otherwise. For instance, values of
at small
are increased (i.e. effective dimensions are reduced)
during sleep, under the influence of narcotic drugs, and during epileptic seizures.
An interesting suggestion which has stimulated much controversy is that there is also
a ``preictal" phase preceding epileptic seizures, during which
is
reduced and which could be used to predict seizures (Elger and Lehnertz 2004).
For further reading, see (Kantz and Schreiber 2003). For public domain software, see e.g. (Hegger et al. 2007).
References
- W.A. Brock, W.D. Dechert, J.A. Scheinkman, and B. LeBaron, Economic Reviews 15, 197 (1996).
- C.E. Elger and K. Lehnertz, ``Prediction of seizure occurrence by chaos analysis: Technique and therapeutic implications", in: F. Rosenow et al., eds., Handbook of Clinical Neurophysiology Vol.3, pp.491-500 (2004).
- P. Grassberger, T. Schreiber, and C. Schaffrath, Int. J. Bifurcation and Chaos 1, 521 (1991).
- P. Grassberger and I. Procaccia, Physica D 9, 198 (1983); Phys. Rev. Lett. 50, 346 (1983).
- P. Grassberger and I. Procaccia, Phys. Rev. A 28, 2591 (1983).
- P. Grassberger, Phys. Lett. A 97, 227 (1983).
- P. Grassberger, Phys. Lett. A 107, 101 (1985).
- T.C. Halsey, M.H. Jensen, L.P. Kadanoff, I. Procaccia, and B.I. Shraiman, Phys. Rev. A 33, 1141 (1986).
- R. Hegger, H. Kantz and T. Schreiber, TISEAN sortware package; URL {\sf http://www.mpipks-dresden.mpg.de/ tisean} (2007).
- H.G.E. Hentschel and I. Procaccia, Physica D 8, 435 (1983).
- H. Kantz and T. Schreiber, "Nonlinear time series analysis", 2nd edition (Cambridge University Press, Cambridge 2003).
- H. Osborne and A. Provenzale, Physica D 35, 375 (1989).
- N.H. Packard, J.P. Crutchfield, J.D. Farmer, and R.S. Shaw, Phys. Rev. Lett. 45,712 (1980).
- T. Sauer, J.A. Yorke, and M. Casdagli, J. Stat. Phys. 65, 579 (1991).
- T. Schreiber, Int. J. Bifurcation and Chaos 5, 349 (1995).
- F. Takens, in: Proc. Warwick Symp. 1980, D. Rand and L.S. Young, eds., Lecture Notes in Math. 898 (Springer, Berlin, 1981).
- F. Takens, ``Invariants related to dimension and entropy", Atas do
Coloquio Brasileiro de Matematica (1982).
- F. Takens, in: B.L.J. Braaksma et al., eds., "Dynamical Systems and Bifurcations", Lecture Notes in Math. Vol. 1125 (Springer, Heidelberg, 1985).
- J. Theiler, Phys. Lett. A 135, 195 (1988).
- J. Theiler, J. Opt. Soc. Amer. A 7, 1055 (1990).
- G. Widmann et al., Physica D 121, 65 (1998).
- T.A. Witten and L.M. Sander, Phys. Rev. Lett. 47, 1400 (1981).
See Also
| Peter Grassberger (2007) Grassberger-Procaccia algorithm. Scholarpedia, 2(5):3043, (go to the first approved version) Created: 3 February 2007, reviewed: 30 April 2007, accepted: 1 May 2007 |





