pyhctsa.operations.symbolic.binary_stats¶
-
pyhctsa.operations.symbolic.binary_stats(y, binary_method=
'diff')¶ Compute statistics on a binary symbolisation of the input time series.
The time series is first symbolized as a binary string of 0s and 1s using a specified coarse-graining (symbolisation) method. Then, various statistics are computed to characterize the structure of the resulting binary sequence.
- Parameters:¶
- y : array-like¶
The input time series.
- binary_method : str, optional¶
The binary symbolisation rule. One of:
’diff’: Encode as 1 if the time-series difference is positive, and 0 otherwise.
’mean’: Encode as 1 if the value is above the mean, 0 otherwise.
’median’: Encode as 1 if the value is above the median, 0 otherwise.
’iqr’: Encode as 1 if the value is within the interquartile range (above the 25th percentile and below the 75th), 0 otherwise.
Default is
'diff'.
- Returns:¶
Statistics computed on the binary symbolisation. The standard deviations of the stretch lengths are NaN if there are no stretches of that symbol, and 0 if there is a single stretch.
- Return type:¶
dict