pyhctsa.operations.correlation.trev

pyhctsa.operations.correlation.trev(y, tau='ac')

Normalized nonlinear autocorrelation (trev) function of a time series.

Calculates the trev function, a normalized nonlinear autocorrelation, as described in the TSTOOL nonlinear time-series analysis package. This quantity is often used as a nonlinearity statistic in surrogate data analysis, see [1].

References

Parameters:
y : array-like

Input time series.

tau : int or str, optional

Time lag. Can be:
  • int: Use the specified lag.

  • ’ac’: Use the first zero-crossing of the autocorrelation function (default).

  • ’mi’: Use the first minimum of the automutual information function.

Returns:

Dictionary containing:
  • ’raw’: The raw trev expression.

  • ’abs’: The magnitude of the raw expression.

  • ’num’: The numerator.

  • ’absnum’: The magnitude of the numerator.

  • ’denom’: The denominator.

Return type:

dict