Title: | Statistical Complexity and Information Measures for Time Series Analysis |
---|---|
Description: | An implementation of local and global statistical complexity measures (aka Information Theory Quantifiers, ITQ) for time series analysis based on ordinal statistics (Bandt and Pompe (2002) <DOI:10.1103/PhysRevLett.88.174102>). Several distance measures that operate on ordinal pattern distributions, auxiliary functions for ordinal pattern analysis, and generating functions for stochastic and deterministic-chaotic processes for ITQ testing are provided. |
Authors: | Sebastian Sippel [aut, cre] (Original package development was supported by MPI Biogeochemistry, BGI Department), Holger Lange [aut], Fabian Gans [aut] |
Maintainer: | Sebastian Sippel <[email protected]> |
License: | GPL-2 |
Version: | 0.1.0 |
Built: | 2024-12-22 06:32:23 UTC |
Source: | CRAN |
Calculates "Abbe" values.
Abbe(x)
Abbe(x)
x |
A time series |
"Abbe" values quantify the degree of smoothness of a time series. Decreases to zero for very smooth time series, tends to unity for purely white noise. Following Tarnopolski et al. Physica A 461 (2016) 662-673.
Abbe value
Sebastian Sippel
Tarnopolski et al. (2016), Physica A 461, 662-673.
x = arima.sim(model=list(ar = 0.3), n = 10^4) Abbe(x)
x = arima.sim(model=list(ar = 0.3), n = 10^4) Abbe(x)
Adjusts and reorders a pattern ordering matrix.
adjust_pattern(pattern_matrix, adjustment)
adjust_pattern(pattern_matrix, adjustment)
pattern_matrix |
A numeric matrix that specifies the pattern to be transformed into the position vector. ATTENTION: Pattern should be in the ranks permutation notation, otherwise does not really make sense. |
adjustment |
A character vector, either adjustment = "jumps" or adjustment = "bitflips" that denotes the sorting type |
This function reorders permutations based on "jumps" or based on "bitflips".
A numeric matrix that contains the permutation matrix.
Sebastian Sippel
Sebastian Sippel, 2014. Master Thesis. University of Bayreuth.
Renyi complexity
complexity_Renyi(opd, alpha)
complexity_Renyi(opd, alpha)
opd |
A numeric vector that details an ordinal pattern distribution. |
alpha |
alpha parameter in Renyi complexity |
This function calculates the Renyi complexity as described in Jauregui et al., Physica A, 498 74-85, 2018.
The Renyi complexity value.
Sebastian Sippel
Jauregui et al., Physica A, 498 74-85, 2018.
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) complexity_Renyi(opd = opd, alpha = 0.5)
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) complexity_Renyi(opd = opd, alpha = 0.5)
The function computes the Fisher information, i.e. a local information measure based on two different discretizations.
fis(opd, discretization)
fis(opd, discretization)
opd |
A numeric vector that details an ordinal pattern distribution in a user-specified permutation coding scheme. |
discretization |
The discretization scheme to use, either 'Olivares.2012' or 'Ferri.2009' |
The Fisher information is a local information and complexity measure, computed based on the ordinal pattern distribution. The Fisher information is based on local gradients, hence it is sensitive to the permutation coding scheme. Options for discretization: 'Olivares.2012' or 'Ferri.2009', following Fisher Information discretization schemes in the respective publications.
The normalized Fisher information measure in the range [0, 1].
Sebastian Sippel
Olivares, F., Plastino, A. and Rosso, O.A., 2012. Ambiguities in Bandt-Pompe's methodology for local entropic quantifiers. Physica A: Statistical Mechanics and its Applications, 391(8), pp.2518-2526. Ferri, G.L., Pennini, F. and Plastino, A., 2009. LMC-complexity and various chaotic regimes. Physics Letters A, 373(26), pp.2210-2214.
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) fis(opd = opd)
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) fis(opd = opd)
Generates all permutations of a given embedding dimension, ordered according to the Lehmer coding scheme.
generate_lehmerperm_matrix(ndemb)
generate_lehmerperm_matrix(ndemb)
ndemb |
The embedding dimension. |
This function converts ranks to indices and back.
A numeric matrix that contains the Lehmer permutation pattern.
Sebastian Sippel
http://www.keithschwarz.com/interesting/code/?dir=factoradic-permutation
This is a high-level function that calculates global complexity measures directly from a given time series or ordinal pattern distribution.
global_complexity(x = NA, opd = NA, ndemb)
global_complexity(x = NA, opd = NA, ndemb)
x |
(OPTIONAL) If opd is not specified, a time series vector x must be specified |
opd |
A numeric vector that details an ordinal pattern distribution in a user-specified permutation coding scheme. |
ndemb |
(OPTIONAL) If x is given, the embedding dimension (ndemb) is required. |
This function calculates the following global measures of complexity and information:
Permutation Entropy (PE, cf. Bandt and Pompe, 2002)
Permutation Statistical complexity (MPR complexity, cf. Martin, Plastino and Rosso, 2006)
Number of "forbiden patterns" (cf. Amigo 2010)
A named vector containing the three global complexity measures.
Sebastian Sippel
Bandt, C. and Pompe, B., 2002. Permutation entropy: a natural complexity measure for time series. Physical review letters, 88(17), p.174102. Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462. Amigo, J., 2010. Permutation complexity in dynamical systems: ordinal patterns, permutation entropy and all that. Springer Science & Business Media.
x = arima.sim(model=list(ar = 0.3), n = 10^4) global_complexity(x = x, ndemb = 6) # or: opd = ordinal_pattern_distribution(x = x, ndemb = 6) global_complexity(opd = opd, ndemb = 6)
x = arima.sim(model=list(ar = 0.3), n = 10^4) global_complexity(x = x, ndemb = 6) # or: opd = ordinal_pattern_distribution(x = x, ndemb = 6) global_complexity(opd = opd, ndemb = 6)
Compute the Hellinger Distance
hellinger_distance(p, q)
hellinger_distance(p, q)
p |
An ordinal pattern distribution |
q |
A second ordinal pattern distribution to compare against p. |
This function returns a distance measure.
A vector of length 1.
Sebastian Sippel
none
p = ordinal_pattern_distribution(rnorm(10000), ndemb = 5) q = ordinal_pattern_distribution(arima.sim(model=list(ar=0.9), n= 10000), ndemb = 5) hellinger_distance(p=p, q = q)
p = ordinal_pattern_distribution(rnorm(10000), ndemb = 5) q = ordinal_pattern_distribution(arima.sim(model=list(ar=0.9), n= 10000), ndemb = 5) hellinger_distance(p=p, q = q)
Generates a time series from the Henon map
henon_map(N, a, b, startx="rand", starty="rand", disregard_N=0)
henon_map(N, a, b, startx="rand", starty="rand", disregard_N=0)
N |
length of the time series that is to be generated |
a |
Henon map parameter a |
b |
Henon map parameter b |
startx |
start value in x direction. Default is to random. |
starty |
start value in y direction. Default is to random. |
disregard_N |
Number of values at the beginning of the series to disregard |
A vector of length N
Sebastian Sippel
Schuster, H.G., 1988. Deterministic chaos. An Introduction.
henon_map(N = 10^4, a=1.4, b=0.3)
henon_map(N = 10^4, a=1.4, b=0.3)
Calculates a Horizontal Visibility Graph
HVG(x, meth, maxL, rho)
HVG(x, meth, maxL, rho)
x |
A time series |
meth |
A character string that describes the HVG method to use. Currently implemented: "HVG", "HVG_weighted", "LPHVG", "LPHVG_weighted". |
maxL |
Maximum length of the time series. |
rho |
Additional parameter |
Horizontal Visibility Graphs map a time series into a complex network. Following Luque, B., Lacasa, L., Ballesteros, F. and Luque, J., 2009. Horizontal visibility graphs: Exact results for random time series. Physical Review E, 80(4), p.046103. ATTENTION: This function is still in development and needs further testing!
A list that contains the adjacency matrix, degree distribution, and further HVG-based statistics.
Sebastian Sippel
Luque, B., Lacasa, L., Ballesteros, F. and Luque, J., 2009. Physical Review E, 80(4), p.046103.
x = arima.sim(model=list(ar = 0.3), n = 10^2) HVG(x, meth = "HVG", maxL = 10^9, rho = NA)
x = arima.sim(model=list(ar = 0.3), n = 10^2) HVG(x, meth = "HVG", maxL = 10^9, rho = NA)
Computes a normalized form of the Jensen-Shannon Divergence
jensen_shannon_divergence(p, q="unif")
jensen_shannon_divergence(p, q="unif")
p |
An ordinal pattern distribution |
q |
A second ordinal pattern distribution to compare against p, or a character vector q="unif" (comparison of p to uniform distribution) |
This function returns a distance measure.
A vector of length 1.
Sebastian Sippel
Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
p = ordinal_pattern_distribution(rnorm(10000), ndemb = 5) q = ordinal_pattern_distribution(arima.sim(model=list(ar=0.9), n= 10000), ndemb = 5) jensen_shannon_divergence(p = p, q = q)
p = ordinal_pattern_distribution(rnorm(10000), ndemb = 5) q = ordinal_pattern_distribution(arima.sim(model=list(ar=0.9), n= 10000), ndemb = 5) jensen_shannon_divergence(p = p, q = q)
Compute the limit curves in the Entropy Complexity plane
limit_curves(ndemb, fun = "min")
limit_curves(ndemb, fun = "min")
ndemb |
Embedding dimension |
fun |
Whether the upper (max) or lower (min) limit curve should be computed |
This function returns the respective limit curve.
A list with two entries
Sebastian Sippel
none
Generates a time series from the logistic map
logistic_map(N, r, start="rand", disregard_N=0)
logistic_map(N, r, start="rand", disregard_N=0)
N |
length of the time series that is to be generated |
r |
logistic map parameter, must be in the range [0,4] |
start |
start value. Default is to random. |
disregard_N |
Number of values at the beginning of the series to disregard |
A vector of length N
Sebastian Sippel
May, R.M., 1976. Simple mathematical models with very complicated dynamics. Nature, 261(5560), pp.459-467.
logistic_map(N = 10^4, r=4)
logistic_map(N = 10^4, r=4)
Maximum curve of time-causal entropy-complexity plane at ndemb=3
maxd3
maxd3
A data frame with 494 rows and 2 columns:
x-values of minimum curve if ndemb==3
y-values of minimum curve if ndemb==3
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
Maximum curve of time-causal entropy-complexity plane at ndemb=4
maxd4
maxd4
A data frame with 2139 rows and 2 columns:
x-values of minimum curve if ndemb==4
y-values of minimum curve if ndemb==4
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
Maximum curve of time-causal entropy-complexity plane at ndemb=5
maxd5
maxd5
A data frame with 4151 rows and 2 columns:
x-values of minimum curve if ndemb==5
y-values of minimum curve if ndemb==5
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
Maximum curve of time-causal entropy-complexity plane at ndemb=6
maxd6
maxd6
A data frame with 3438 rows and 2 columns:
x-values of minimum curve if ndemb==6
y-values of minimum curve if ndemb==6
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
Calculates MIG and FC
migfc(x, L)
migfc(x, L)
x |
A time series |
L |
word length parameter |
MIG and FC are based on a median partitioning of the time series Following Hauhs, M. and Lange, H., 2008. Classification of runoff in headwater catchments: A physical problem?. Geography Compass, 2(1), pp.235-254. ATTENTION: This function is still in development and needs further testing!
A list containing MIG, FC and transition matrices.
Sebastian Sippel
Hauhs, M. and Lange, H., (2008) Geography Compass, 2(1), pp.235-254.
x = arima.sim(model=list(ar = 0.3), n = 10^4) migfc(x, L=4)
x = arima.sim(model=list(ar = 0.3), n = 10^4) migfc(x, L=4)
Minimum curve of time-causal entropy-complexity plane at ndemb=3
mind3
mind3
A data frame with 500 rows and 2 columns:
x-values of minimum curve if ndemb==3
y-values of minimum curve if ndemb==3
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
Minimum curve of time-causal entropy-complexity plane at ndemb=4
mind4
mind4
A data frame with 500 rows and 2 columns:
x-values of minimum curve if ndemb==4
y-values of minimum curve if ndemb==4
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
Minimum curve of time-causal entropy-complexity plane at ndemb=5
mind5
mind5
A data frame with 500 rows and 2 columns:
x-values of minimum curve if ndemb==5
y-values of minimum curve if ndemb==5
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
Minimum curve of time-causal entropy-complexity plane at ndemb=6
mind6
mind6
A data frame with 500 rows and 2 columns:
x-values of minimum curve if ndemb==6
y-values of minimum curve if ndemb==6
...
Computed based on Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
The function computes the MPR complexity, i.e. a generalized (global) complexity measure based on the Jenson-Shannon divergence.
MPR_complexity(opd)
MPR_complexity(opd)
opd |
A numeric vector that details an ordinal pattern distribution. |
Generalized complexity measures combine an information measure (i.e. entropy) with the distance of the distribution from the uniform distribution ("disequilibrium"). As a global measure, MPR-complexity is insensitive to the permutation coding scheme.
The normalized MPR complexity measure in the range [0, 1].
Sebastian Sippel
Martin, M.T., Plastino, A. and Rosso, O.A., 2006. Generalized statistical complexity measures: Geometrical and analytical properties. Physica A: Statistical Mechanics and its Applications, 369(2), pp.439-462.
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) MPR_complexity(opd)
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) MPR_complexity(opd)
Computation of bitflip statistics of a time series
nbitflips(x, ndemb)
nbitflips(x, ndemb)
x |
A numeric vector (e.g. a time series), from which the ordinal pattern distribution is to be calculated |
ndemb |
Embedding dimension of the ordinal patterns (i.e. sliding window size) for which bitflips are to be calculated. Should be chosen such as length(x) >> ndemb |
This function returns a histogram and time series of the number of bitflips occurring in the associated ordinal patterns. NA values are allowed, and any pattern that contains at least one NA value will be ignored. WARNING: Can be slow with very long time series (n > 10^7).
A list with two entries is returned.
Sebastian Sippel
Sippel, S., 2014. Evaluating the carbon dynamics of biogeochemical models using statistical complexity measures. Master Thesis, University of Bayreuth.
x = arima.sim(model=list(ar = 0.3), n = 10^4) nbitflips(x = x, ndemb = 6)
x = arima.sim(model=list(ar = 0.3), n = 10^4) nbitflips(x = x, ndemb = 6)
Computation of the ordinal patterns of a time series (see e.g. Bandt and Pompe 2002)
ordinal_pattern_distribution(x, ndemb)
ordinal_pattern_distribution(x, ndemb)
x |
A numeric vector (e.g. a time series), from which the ordinal pattern distribution is to be calculated |
ndemb |
Embedding dimension of the ordinal patterns (i.e. sliding window size). Should be chosen such as length(x) >> ndemb |
This function returns the distribution of ordinal patterns using the Keller coding scheme, detailed in Physica A 356 (2005) 114-120. NA values are allowed, and any pattern that contains at least one NA value will be ignored. (Fast) C routines are used for computing ordinal patterns.
A character vector of length factorial(ndemb) is returned.
Sebastian Sippel
Bandt, C. and Pompe, B., 2002. Permutation entropy: a natural complexity measure for time series. Physical review letters, 88(17), p.174102.
x = arima.sim(model=list(ar = 0.3), n = 10^4) ordinal_pattern_distribution(x = x, ndemb = 6)
x = arima.sim(model=list(ar = 0.3), n = 10^4) ordinal_pattern_distribution(x = x, ndemb = 6)
Computation of the ordinal patterns of a time series (see e.g. Bandt and Pompe 2002)
ordinal_pattern_time_series(x, ndemb)
ordinal_pattern_time_series(x, ndemb)
x |
A numeric vector (e.g. a time series), from which the ordinal pattern time series is to be calculated |
ndemb |
Embedding dimension of the ordinal patterns (i.e. sliding window size). Should be chosen such as length(x) >> ndemb |
This function returns the distribution of ordinal patterns using the Keller coding scheme, detailed in Physica A 356 (2005) 114-120. NA values are allowed, and any pattern that contains at least one NA value will be ignored. (Fast) C routines are used for computing ordinal patterns.
A character vector of length(x) is returned.
Sebastian Sippel
Bandt, C. and Pompe, B., 2002. Permutation entropy: a natural complexity measure for time series. Physical review letters, 88(17), p.174102.
x = arima.sim(model=list(ar = 0.3), n = 10^4) ordinal_pattern_time_series(x = x, ndemb = 6)
x = arima.sim(model=list(ar = 0.3), n = 10^4) ordinal_pattern_time_series(x = x, ndemb = 6)
Computation of the permutation entropy of a time series based on its ordinal pattern distribution (see Bandt and Pompe 2002). Permutation entropy is a global information measure, hence insensitive to the permutation ordering scheme.
permutation_entropy(opd)
permutation_entropy(opd)
opd |
A numeric vector that details an ordinal pattern distribution. |
This function calculates the permutation entropy as described in Bandt and Pompe 2002.
The normalized permutation entropy as a numeric value in the range [0,1].
Sebastian Sippel
Bandt, C. and Pompe, B., 2002. Permutation entropy: a natural complexity measure for time series. Physical review letters, 88(17), p.174102.
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) permutation_entropy(opd)
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) permutation_entropy(opd)
q-log permutation entropy
permutation_entropy_qlog(opd, q)
permutation_entropy_qlog(opd, q)
opd |
A numeric vector that details an ordinal pattern distribution. |
q |
q-log parameter |
This function calculates the q-log permutation entropy as described in Ribeiro et al. 2017.
The q-log permutation entropy value.
Sebastian Sippel
Ribeiro et al. 2017, https://arxiv.org/abs/1705.04779.
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) permutation_entropy_qlog(opd = opd, q = 1)
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) permutation_entropy_qlog(opd = opd, q = 1)
Renyi permutation entropy
permutation_entropy_Renyi(opd, alpha)
permutation_entropy_Renyi(opd, alpha)
opd |
A numeric vector that details an ordinal pattern distribution. |
alpha |
alpha parameter in Renyi entropy |
This function calculates the Renyi entropy as described in Jauregui et al., Physica A, 498 74-85, 2018.
The Renyi entropy value.
Sebastian Sippel
Jauregui et al., Physica A, 498 74-85, 2018.
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) permutation_entropy_Renyi(opd = opd, alpha = 0.5)
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) permutation_entropy_Renyi(opd = opd, alpha = 0.5)
Generates samples of power law noise.
powernoise(k, N)
powernoise(k, N)
k |
Power law scaling exponent |
N |
number of samples to generate |
Generates samples of power law noise. The power spectrum of the signal scales as f^(-k). The R function uses fft(), similarly to the knoise_fft Matlab function.
A named list with three entries is returned. x - N x 1 vector of power law samples
Sebastian Sippel and Holger Lange
powernoise_series = powernoise(k=2, N=10000)
powernoise_series = powernoise(k=2, N=10000)
q-log complexity
q_complexity(opd, q)
q_complexity(opd, q)
opd |
A numeric vector that details an ordinal pattern distribution. |
q |
q-log parameter |
This function calculates the q-log complexity as described in Ribeiro et al. 2017.
The q-log complexity value.
Sebastian Sippel
Ribeiro et al. 2017, https://arxiv.org/abs/1705.04779.
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) q_complexity(opd = opd, q = 1)
x = arima.sim(model=list(ar = 0.3), n = 10^4) opd = ordinal_pattern_distribution(x = x, ndemb = 6) q_complexity(opd = opd, q = 1)
Generates a time series from the Quadradtic map
quadratic_map(N, k, start="rand", disregard_N=0)
quadratic_map(N, k, start="rand", disregard_N=0)
N |
length of the time series that is to be generated |
k |
Quadratic map parameter |
start |
start value. Default is to random. |
disregard_N |
Number of values at the beginning of the series to disregard |
A vector of length N
Sebastian Sippel
Grebogi, C., Ott, E. and Yorke, J.A., 1983. Crises, sudden changes in chaotic attractors, and transient chaos. Physica D: Nonlinear Phenomena, 7(1-3), pp.181-200.
quadratic_map(N = 10^4, k=1.4)
quadratic_map(N = 10^4, k=1.4)
Converts permutations denoted by ranks to permutations denoted by indices and back.
rank_to_permutation(pattern, permutation.notation)
rank_to_permutation(pattern, permutation.notation)
pattern |
A numeric vector that denotes a permutation pattern. |
permutation.notation |
The permutation notation that should be used. Could be "Olivares.2012" or "Keller.2005". |
This function converts ranks to indices and back.
A numeric vector, which contains the transformed permutation.
Sebastian Sippel
Sebastian Sippel (2014). Master Thesis. University of Bayreuth.
Generates a time series from the Schuster map
schuster_map(N, z, start="rand", disregard_N=0)
schuster_map(N, z, start="rand", disregard_N=0)
N |
length of the time series that is to be generated |
z |
Schuster map parameter |
start |
start value. Default is to random. |
disregard_N |
Number of values at the beginning of the series to disregard |
A vector of length N
Sebastian Sippel
Schuster, H.G., 1988. Deterministic chaos. An Introduction.
schuster_map(N = 10^4, z=2)
schuster_map(N = 10^4, z=2)
Generates a time series from the Skew-Tent map
skew_tent_map(N, a, start="rand", disregard_N=0)
skew_tent_map(N, a, start="rand", disregard_N=0)
N |
length of the time series that is to be generated |
a |
Skew-Tent map parameter, must be in the range [0,1] |
start |
start value. Default is to random. |
disregard_N |
Number of values at the beginning of the series to disregard |
A vector of length N
Sebastian Sippel
Schuster, H.G., 1988. Deterministic chaos. An Introduction.
skew_tent_map(N = 10^4, a=0.1847)
skew_tent_map(N = 10^4, a=0.1847)
Generates a time series from the logistic map
tent_map(N, mu, start="rand", disregard_N=0)
tent_map(N, mu, start="rand", disregard_N=0)
N |
length of the time series that is to be generated |
mu |
Tent map parameter, must be in the range [0,2] |
start |
start value. Default is to random. |
disregard_N |
Number of values at the beginning of the series to disregard |
A vector of length N
Sebastian Sippel
Feldman, D.P., McTague, C.S. and Crutchfield, J.P., 2008. The organization of intrinsic computation: Complexity-entropy diagrams and the diversity of natural information processing. Chaos: An Interdisciplinary Journal of Nonlinear Science, 18(4), p.043106.
tent_map(N = 10^4, mu=1.8)
tent_map(N = 10^4, mu=1.8)
Generates a position vector to change the ordinal pattern distribution in the default permutation coding scheme (i.e. generated by ordinal_pattern_distribution(x, ndemb)) into a user-specified coding scheme. This is a required input for the function changePermCodingOPD.
transformPermCoding(target_pattern, ndemb)
transformPermCoding(target_pattern, ndemb)
target_pattern |
A numeric matrix that specifies the pattern to be transformed into the position vector. |
ndemb |
Embedding dimension of the ordinal patterns (i.e. sliding window size). Should be chosen such as length(x) >> ndemb |
This function returns a character vector to transform the output of ordinal_pattern_distribution (permutation coding as of Keller and Sinn, 2005) into a user-specified permutation coding scheme. For example, pattern #5 in "lehmerperm" (ndemb = 5) is given by the ranks c(0, 1, 4, 2, 3). This corresponds to pattern #41 in the (original) Keller coding scheme, as given by transformPermCoding(target_pattern = "lehmerperm", ndemb = 5)[5].
A numeric vector of length factorial(ndemb), which contains the positions of the corresponding patterns in the Keller Coding scheme.
Sebastian Sippel
Olivares, F., Plastino, A. and Rosso, O.A., 2012. Ambiguities in Bandt-Pompe's methodology for local entropic quantifiers. Physica A: Statistical Mechanics and its Applications, 391(8), pp.2518-2526.
transformPermCoding(target_pattern = "lehmerperm", ndemb = 4)
transformPermCoding(target_pattern = "lehmerperm", ndemb = 4)
Calculates Turning point values.
Turning_point(x)
Turning_point(x)
x |
A time series |
Turning point of a time series. Following Tarnopolski et al. Physica A 461 (2016) 662-673.
Turning point value
Sebastian Sippel
Tarnopolski et al. (2016), Physica A 461, 662-673.
x = arima.sim(model=list(ar = 0.3), n = 10^4) Turning_point(x)
x = arima.sim(model=list(ar = 0.3), n = 10^4) Turning_point(x)
Computation of weighted ordinal patterns of a time series. Weights can be generated by a user-specified function (e.g. variance-weighted, see Fadlallah et al 2013).
weighted_ordinal_pattern_distribution(x, ndemb)
weighted_ordinal_pattern_distribution(x, ndemb)
x |
A numeric vector (e.g. a time series), from which the weighted ordinal pattern distribution is to be calculated |
ndemb |
Embedding dimension of the ordinal patterns (i.e. sliding window size). Should be chosen such as length(x) >> ndemb |
This function returns the distribution of weighted ordinal patterns using the Keller coding scheme, detailed in Physica A 356 (2005) 114-120. NA values are allowed. The function uses old and slow R routines and is only maintained for comparability. For faster routines, see weighted_ordinal_pattern_distribution.
A character vector of length factorial(ndemb) is returned.
Sebastian Sippel
Fadlallah, B., Chen, B., Keil, A. and Principe, J., 2013. Weighted-permutation entropy: A complexity measure for time series incorporating amplitude information. Physical Review E, 87(2), p.022911.
weighted_ordinal_pattern_distribution
x = arima.sim(model=list(ar = 0.3), n = 10^4) weighted_ordinal_pattern_distribution(x = x, ndemb = 6)
x = arima.sim(model=list(ar = 0.3), n = 10^4) weighted_ordinal_pattern_distribution(x = x, ndemb = 6)