pyhctsa.operations.correlation.histogram_ami¶
-
pyhctsa.operations.correlation.histogram_ami(y, tau=
1, meth='even', num_bins=10)¶ The automutual information of the distribution using histograms.
Computes the automutual information between a time series and its time-delayed version using different methods for binning the data. The plug-in estimate is corrected for finite-sample bias with the Miller-Madow (Panzeri-Treves) term (Mxy - Mx - My + 1) / (2n), where Mxy, Mx and My are the numbers of occupied joint and marginal bins and n is the number of delay pairs; the result is not clamped at zero and can be slightly negative.
- Parameters:¶
- y : array-like¶
The input time series.
- tau : int, list, or str, optional¶
The time-lag(s). Can be an integer time lag, list of time lags, or ‘ac’/’tau’ to use first zero-crossing of autocorrelation function (also ‘ac1e’ or ‘mi’, see
get_tau()). Default is 1.- meth : str, optional¶
The method for binning data:
’even’: evenly-spaced bins through the range
’std1’: bins extending to ±1 standard deviation from mean
’std2’: bins extending to ±2 standard deviations from mean
’quantiles’: equiprobable bins using quantiles (fewer bins if values are tied at a quantile)
The bin edges are explicit, so that a value exactly on an edge always falls in the same bin (see
bf_hist_edges()).Default is
'even'.- num_bins : int, optional¶
The number of bins to use. Default is 10.
- Returns:¶
If single tau: The automutual information value If multiple taus: Dictionary of automutual information values
- Return type:¶
Union[float, dict]