pyhctsa.operations.nonlinearity.box_count_entropy_rate¶
-
pyhctsa.operations.nonlinearity.box_count_entropy_rate(y, num_bins=
100, embed_params=('ac', 'fnn'))¶ How the box-counting (order-2 Renyi) entropy of a delay embedding grows with embedding dimension.
Time-delay embeds the series in
d = 1, ..., mdimensions and partitions the space into boxes of sideepsilon, using TISEAN’sboxcount. Withp_ithe fraction of embedded points in boxi,boxcountgives the order-2 Renyi (collision) entropyH(epsilon, d) = -log(sum_i p_i^2)for a sweep ofnum_binsbox sizes, from the full range of the series downward, and the increment over the(d-1)-dimensional embedding,I(epsilon, d) = H(epsilon, d) - H(epsilon, d-1)(defined ford = 2, ..., m; atd = 1,boxcountreportsHitself, which is not an increment, sod = 1is excluded from all summaries). The matrixI(length scales by embedding dimensions2, ..., m) is summarized across length scales for each dimension, across dimensions for each length scale, and overall.The increment
Iapproaches the entropy rate of the process (the K2 entropy, per delay step) rather than a slope againstlog(epsilon), so these features are entropy-rate-like, not correlation dimensions (despite hctsa’s former name for this operation, NL_BoxCorrDim). hctsa registersmeanr,medianr,minrandmeanchratr= 2, 3, 4, 6, 8, 11, 14, 17, 20, 24, 28, 32, 36 ofnum_bins = 50(2 to 429 boxes per axis). Testing indicated that coarse scales change quickly withr(so they are sampled densely), that neighboring finer scales are nearly redundant, that for flows (long delays) the informative scales lie beyondr = 18, and that beyondr = 36the 5-dimensional embedding saturates (I = 0) for series of a few thousand points.- Parameters:¶
- y : array-like¶
The input time series.
- num_bins : int, optional¶
The number of length-scale (
epsilon) values in the box-counting sweep (at least 2). TSTOOL’s “maximum number of partitions per axis” has no exact TISEAN equivalent; this is the closest analogue. Default is 100.- embed_params : list or tuple, optional¶
The embedding parameters as
(tau, m): the time delay (an integer, or a rule understood bypyhctsa.utils.get_tau():'ac','ac1e'or'mi') and the embedding dimension (an integer, or'fnn'for false nearest neighbors). hctsa uses('ac1e', 5). Default is('ac', 'fnn').
- Returns:¶
NaN if the embedding parameters cannot be determined, the series is constant, or the embedding dimension is below 2. Otherwise summaries of
I(epsilon, d), withdthe embedding dimension andrthe index (from 1) of the length scale (r = 1is the full range of the series, largerrare finer scales):meand<d>,mediand<d>: mean and median ofIover length scales, at embedding dimensiond = 2, ..., mmeanr<r>,medianr<r>,minr<r>: mean, median and minimum ofIover embedding dimensions2, ..., m, at length scaler = 2, ..., num_binsmeanchr<r>: mean change ofIfrom one embedding dimension to the next (d = 2, ..., m), at length scaler = 2, ..., num_bins(NaN form = 2)stdmean,stdmedian: standard deviation, across embedding dimensions2, ..., m, of the mean (or median) ofIover length scalesmedianstretch,iqrstretch: median and interquartile range ofIover all length scales and embedding dimensions2, ..., m
(The minima over all length scales are not returned: the coarsest scale is a single box, where
I = 0, so they are always 0.)- Return type:¶
dict or float