pyhctsa.operations.symbolic.motif_two

pyhctsa.operations.symbolic.motif_two(y, binarize_how='diff')

Compute local motifs in a binary symbolization of the input time series.

This function coarse-grains the input time series into a binary sequence using the specified binarization method, and computes the probabilities of binary words of lengths 1 through 4, along with their entropies.

Parameters:
y : array-like

The input time series.

binarize_how : str, optional

The method used for binary transformation. One of:

  • ’diff’: Encode increases in the time series as 1, and decreases as 0 (default).

  • ’mean’: Encode values above the mean as 1, and below as 0.

  • ’median’: Encode values above the median as 1, and below as 0.

Returns:

A dictionary containing:

  • ’prob_len_1’, ‘prob_len_2’, …, ‘prob_len_4’:

    Lists of probabilities for each binary word of lengths 1 to 4.

  • ’entropy_len_1’, ‘entropy_len_2’, …, ‘entropy_len_4’:

    Entropy values associated with the word distributions of lengths 1 to 4.

Return type:

dict