Functions for estimating the information dimension of a dynamical system from 1-dimensional time series using Takens' vectors
infDim(
time.series,
min.embedding.dim = 2,
max.embedding.dim = min.embedding.dim,
time.lag = 1,
min.fixed.mass,
max.fixed.mass,
number.fixed.mass.points = 10,
radius,
increasing.radius.factor = sqrt(2),
number.boxes = NULL,
number.reference.vectors = 5000,
theiler.window = 1,
kMax = 1000,
do.plot = TRUE,
...
)# S3 method for infDim
fixedMass(x)
# S3 method for infDim
logRadius(x)
# S3 method for infDim
embeddingDims(x)
# S3 method for infDim
estimate(
x,
regression.range = NULL,
do.plot = TRUE,
use.embeddings = NULL,
col = NULL,
pch = NULL,
fit.col = NULL,
fit.lty = 2,
fit.lwd = 2,
add.legend = T,
lty = 1,
lwd = 1,
...
)
# S3 method for infDim
plot(
x,
main = "Information Dimension",
xlab = "fixed mass (p)",
ylab = "",
type = "b",
log = "x",
ylim = NULL,
col = NULL,
pch = NULL,
localScalingExp = T,
add.legend = T,
...
)
# S3 method for infDim
plotLocalScalingExp(
x,
main = "Local scaling exponents d1(p)",
xlab = "fixed mass p",
ylab = "1/d1(p)",
type = "b",
log = "x",
ylim = NULL,
col = NULL,
pch = NULL,
add.legend = T,
...
)
A infDim object that consist of a list with two components: log.radius and fixed.mass. log.radius contains the average log10(radius) in which the fixed.mass can be found.
The fixedMass function returns the fixed mass vector used in the information dimension algorithm.
The logRadius function returns the average log(radius) computed on the information dimension algorithm.
The embeddingDims function returns the embeddings in which the information dimension was computed
The 'estimate' function estimates the information dimension of the 'infDim' object by by averaging the slopes of the embedding dimensions specified in the use.embeddings parameter. The slopes are determined by performing a linear regression over the fixed mass' range specified in 'regression.range'. If do.plot is TRUE, a graphic of the regression over the data is shown.
The 'plot' function plots the computations performed for the information dimension estimate: a graphic of <log10(radius)> Vs fixed mass. Additionally, the inverse of the local scaling exponents can be plotted.
The plotLocalScalingExp function plots the inverse of the local scaling exponentes of the information dimension (for reasons of numerical stability).
The original time series from which the information dimension will be estimated.
Integer denoting the minimum dimension in which we shall embed the time.series (see buildTakens).
Integer denoting the maximum dimension in which we shall embed the time.series (see buildTakens).Thus, we shall estimate the information dimension between min.embedding.dim and max.embedding.dim.
Integer denoting the number of time steps that will be use
to construct the Takens' vectors (see buildTakens
).
Minimum percentage of the total points that the algorithm shall use for the estimation.
Maximum percentage of the total points that the algorithm shall use for the estimation.
The number of different fixed mass fractions between min.fixed.mass and max.fixed.mass that the algorithm will use for estimation.
Initial radius for searching neighbour points in the phase space. Ideally, it should be small enough so that the fixed mass contained in this radius is slightly greater than the min.fixed.mass. However, whereas the radius is not too large (so that the performance decreases) the choice is not critical.
Numeric value. If no enough neighbours are found within radius, the radius is increased by a factor increasing.radius.factor until succesful. Default: sqrt(2) = 1.414214.
Number of boxes that will be used in the box assisted algorithm (see neighbourSearch).
Number of reference points that the routine will try to use, saving computation time.
Integer denoting the Theiler window: Two Takens' vectors must be separated by more than theiler.window time steps in order to be considered neighbours. By using a Theiler window, we exclude temporally correlated vectors from our estimations.
Maximum number of neighbours used for achieving p with all the points from the time series (see Details).
Logical value. If TRUE (default value), a plot of the correlation sum is shown.
Additional graphical parameters.
A infDim object.
Vector with 2 components denoting the range where the function will perform linear regression.
A numeric vector specifying which embedding dimensions should be used to compute the information dimension.
Vector of colors for each of the dimensions of the plot.
Vector of symbols for each of the dimensions of the plot.
A vector of colors to plot the regression lines.
The type of line to plot the regression lines.
The width of the line for the regression lines.
add a legend to the plot?
The line type of the <log10(radius)> functions.
The line width of the <log10(radius)> functions.
A title for the plot.
A title for the x axis.
A title for the y axis.
Type of plot (see ?plot
).
A character string which contains "x" if the x axis is to be logarithmic, "y" if the y axis is to be logarithmic and "xy" or "yx" if both axes are to be logarithmic.
Numeric vector of length 2, giving the y coordinates range.
add a plot of the local information dimension scaling exponents?
Constantino A. Garcia
The information dimension is a particular case of the generalized correlation dimension when setting the order q = 1. It is possible to demonstrate that the information dimension \(D_1\) may be defined as: \(D_1=lim_{r \rightarrow 0} <\log p(r)>/\log(r)\). Here, \(p(r)\) is the probability of finding a neighbour in a neighbourhood of size \(r\) and <> is the mean value. Thus, the information dimension specifies how the average Shannon information scales with the radius \(r\). The user should compute the information dimension for different embedding dimensions for checking if \(D_1\) saturates.
In order to estimate \(D_1\), the algorithm looks for the scaling behaviour of the the average radius that contains a given portion (a "fixed-mass") of the total points in the phase space. By performing a linear regression of \(\log(p)\;Vs.\;\log(<r>)\) (being \(p\) the fixed-mass of the total points), an estimate of \(D_1\) is obtained.
The algorithm also introduces a variation of \(p\) for achieving a better performance: for small values of \(p\), all the points in the time series (\(N\)) are considered for obtaining \(p=n/N\). Above a maximum number of neighbours \(kMax\), the algorithm obtains \(p\) by decreasing the number of points considerd from the time series \(M<N\). Thus \(p = kMax/M\).
Even with these improvements, the calculations for the information dimension are heavier than those needed for the correlation dimension.
H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press)
corrDim
.
if (FALSE) {
x=henon(n.sample= 3000,n.transient= 100, a = 1.4, b = 0.3,
start = c(0.8253681, 0.6955566), do.plot = FALSE)$x
leps = infDim(x,min.embedding.dim=2,max.embedding.dim = 5,
time.lag=1, min.fixed.mass=0.04, max.fixed.mass=0.2,
number.fixed.mass.points=100, radius =0.001,
increasing.radius.factor = sqrt(2), number.boxes=100,
number.reference.vectors=100, theiler.window = 10,
kMax = 100,do.plot=FALSE)
plot(leps,type="l")
colors2=c("#999999", "#E69F00", "#56B4E9", "#009E73",
"#F0E442", "#0072B2", "#D55E00")
id.estimation = estimate(leps,do.plot=TRUE,use.embeddings = 3:5,
fit.lwd=2,fit.col=1,
col=colors2)
cat("Henon---> expected: 1.24 predicted: ", id.estimation ,"\n")
}
Run the code above in your browser using DataLab