R: Sample Entropy (also known as Kolgomorov-Sinai Entropy)
sampleEntropy
R Documentation
Sample Entropy (also known as Kolgomorov-Sinai Entropy)
Description
The Sample Entropy measures the complexity of a time series. Large values of
the Sample Entropy indicate high complexity whereas that smaller values characterize
more regular signals.
Usage
sampleEntropy(corrDim.object, do.plot = TRUE, ...)
## S3 method for class 'sampleEntropy'
sampleEntropyFunction(x)
## S3 method for class 'sampleEntropy'
nlOrder(x)
## S3 method for class 'sampleEntropy'
radius(x)
## S3 method for class 'sampleEntropy'
embeddingDims(x)
## S3 method for class 'sampleEntropy'
plot(x, main = NULL, xlab = NULL, ylab = NULL,
type = "l", col = NULL, pch = NULL, ylim = NULL, add.legend = T,
...)
## S3 method for class 'sampleEntropy'
estimate(x, regression.range = NULL, do.plot = TRUE,
use.embeddings = NULL, fit.col = NULL, fit.lty = 2, fit.lwd = 2,
add.legend = T, ...)
Arguments
corrDim.object
A corrDim object from which the Sample Entropy
of the time series characterized by corrDim shall be estimated.
do.plot
do.plot Logical value. If TRUE (default value), a plot of the sample entropy is shown.
...
Additional plotting arguments.
x
A sampleEntropy object.
main
A title for the plot.
xlab
A title for the x axis.
ylab
A title for the y axis.
type
Type of plot (see plot).
col
Vector of colors for each of the dimensions of the plot.
pch
Vector of symbols for each of the dimensions of the plot
ylim
Numeric vector of length 2, giving the y coordinates range..
add.legend
add a legend to the plot?
regression.range
Vector with 2 components denoting the range where the function will perform linear regression.
use.embeddings
A numeric vector specifying which embedding dimensions should the estimate function use to compute
the sample entropy.
fit.col
A vector of colors to plot the regression lines.
fit.lty
The type of line to plot the regression lines.
fit.lwd
The width of the line for the regression lines.
Details
The sample entropy is computed using:
hq(m,r) = log(Cq(m,r)/Cq(m+1,r)),
where m is the embedding dimension and r is the radius of the neighbourhood. When
computing the correlation dimensions we use the linear regions from the correlation
sums in order to do the estimates. Similarly, the sample entropy hq(m,r)
should not change for both various m and r.
For each embedding dimension the sample
entropy is estimated by averaging
hq(m,r) = log(Cq(m,r)/Cq(m+1,r))
over the range specified by regression range in the estimate function.
Value
A sampleEntropy object that contains a list storing the sample entropy (sample.entropy),
the embedding dimensions ( embedding.dims) and radius (radius) for which the sample entropy has
been computed, and the order of the sample entropy (entr.order). The sample entropy
is stored as a matrix in which each row contains the computations for a given embedding dimension and
each column stores the computations for a given radius.
The sampleEntropyFunction returns the sample entropy function
h_q(m,r) used for the computations. The sample
entropy function is represented by a matrix. Each row represents a given
embedding dimension whereas that each column representes a different radius.
The nlOrder function returns the order of the sample entropy.
The radius function returns the radius on which the sample entropy
function has been evaluated.
The embeddingDims function returns the embedding dimensions
on which the sample entropy function has been evaluated.
The plot function shows the graphics for the sample entropy.
The estimate function returns a vector storing the sample entropy estimate for each embedding dimension.
Author(s)
Constantino A. Garcia
References
H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press)