pyhctsa.operations.stationarity.simple_stats

pyhctsa.operations.stationarity.simple_stats(x, what_stat='zcross')

Basic statistics about an input time series.

This function computes various statistical measures about zero-crossings and local extrema in a time series.

Parameters:
x : array-like

The input time series

what_stat : str, optional

The statistic to return (default is ‘zcross’):

  • ’zcross’: proportion of zero-crossings (for z-scored input, returns mean-crossings)

  • ’maxima’: proportion of points that are local maxima

  • ’minima’: proportion of points that are local minima

  • ’pmcross’: ratio of crossings above +1σ to crossings below -1σ

  • ’zsczcross’: ratio of zero-crossings in raw vs detrended time series

Returns:

The calculated statistic based on what_stat

Return type:

float