Functions for estimating the Average Mutual Information (AMI) of a time series.
mutualInformation(
time.series,
lag.max = NULL,
n.partitions = NULL,
units = c("Nats", "Bits", "Bans"),
do.plot = TRUE,
...
)# S3 method for mutualInf
plot(
x,
main = "Average Mutual Information (AMI)",
xlab = "Time lag",
ylab = NULL,
type = "h",
...
)
# S3 method for mutualInf
as.numeric(x, ...)
# S3 method for mutualInf
[(x, i)
# S3 method for mutualInf
[[(x, i)
A mutualInf object that consist of a list containing all the relevant information of the AMI computation: time.lag, mutual.information, units and n.partitions.
The observed time series.
Largest lag at which to calculate the AMI.
Number of bins used to compute the probability distribution of the time series.
The units for the mutual information. Allowed units are "Nats", "Bits" or "Bans" (somethings called Hartleys). Default is "Nats".
Logical value. If TRUE, the AMI is plotted
Further arguments for the plotting function.
A mutualInf object.
Title for the plot.
Title for the x axis.
Title for the y axis.
Type of plot to be drawn.
Indices specifying elements to extract.
Constantino A. Garcia
The Average Mutual Information (AMI) measures how much one random variable tells us about another. In the context of time series analysis, AMI helps to quantify the amount of knowledge gained about the value of \(x(t+\tau)\) when observing \(x(t)\).
To measure the AMI iof a time series, we create a histogram of the data using bins. Let \(p_i\) the probability that the signal has a value inside the ith bin, and let \(p_{ij}(\tau)\) be the probability that \(x(t)\) is in bin i ans \(x(t+\tau)\) is in bin j. Then, AMI for time delay \(\tau\) is defined as
$$AMI(\tau) = \sum_{i,j} p_{ij} log(\frac{p_{ij}}{p_i p_j})$$
Depending on the base of the logarithm used to define AMI, the AMI is measured in bits (base 2, also called shannons), nats (base e) or bans (base 10, also called hartleys).
H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press) H. Abarbanel: Analysis of observed chaotic data (Springer, 1996).
timeLag
if (FALSE) {
sx = sinaiMap(a=0.3,n.sample=5000,start=c(0.23489,0.8923),do.plot=FALSE)$x
mutinf = mutualInformation(sx, n.partitions = 20, units = "Bits") }
Run the code above in your browser using DataLab