pyhctsa.operations.correlation.embed2_shapes¶
-
pyhctsa.operations.correlation.embed2_shapes(y, tau=
'tau', shape='circle', r=1.0, theiler_win=('ac', 1))¶ Shape-based statistics in a 2-d embedding space.
Takes a shape and places it on each point in the two-dimensional time-delay embedding space sequentially. For each point it records the fraction of the other points (outside a Theiler window) that are inside the shape, giving a time series of the local density along the trajectory (the pointwise correlation sum, which is intensive and bounded in [0, 1]; raw counts would grow in direct proportion to N), and returns statistics on this extracted time series.
- Parameters:¶
- y : array-like¶
The input time-series (z-scored).
- tau : int or str, optional¶
The time delay: an integer number of samples, or a rule that sets it from the series:
'tau'(or'ac'; the first zero crossing of the autocorrelation function),'ac1e'(the floor of its first 1/e crossing) or'mi'(the smaller of the first minimum of the Kraskov automutual information and the'ac1e'delay); seeget_tau(). A delay set by a rule is capped at N/10; if it cannot be set the output is NaN. Default is'tau'.- shape : str, optional¶
The shape to use. Currently only ‘circle’ is supported. Default is
circle.- r : float, optional¶
The radius of the circle. Default is 1.0.
- theiler_win : list, tuple, int or float, optional¶
The Theiler window: points closer in time than this are not counted as neighbors, since they are close in the embedding only because successive values are correlated.
['ac', k]for k times the first zero-crossing of the autocorrelation function, or a number of samples (seetheiler_window(); 0 counts every other point). Default is('ac', 1). NaN output if the window cannot be set.
- Returns:¶
A dictionary containing various statistics of the constructed time series (
ac1,ac2,ac3,tau,std,median,mean,iqr,iqronrange,mode_val,mode,hist_ent,statav5_m,statav5_s).hist_entissum(p * log(p))over the bins of a histogram of the local densities (minus the Shannon entropy). As in hctsa, the maximum (max) is not returned. If no point has any neighbor withinr, a fixed set of values is returned (std,median,mean,iqr,hist_ent= 0;mode_val= 1;mode= 0; the rest NaN).- Return type:¶
dict