pyhctsa.operations.medical.porta

pyhctsa.operations.medical.porta(x, num_levels=6)

Compute Porta’s symbolic-dynamics word-type indices.

Quantizes the time series into a small number of levels and classifies consecutive length-3 “words” of symbols by their pattern of variation:

  • 0V : no variation (all three symbols equal)

  • 1V : one variation (exactly one of the two transitions is flat)

  • 2LV : two like variations (both transitions move the same direction)

  • 2UV : two unlike variations (transitions move in opposite directions)

Originally developed for heart-rate-variability analysis, quantifying the complexity/regularity of the symbolic dynamics of RR interval sequences.

References

Parameters:
x : array-like

The input time series.

num_levels : int, optional

The number of quantization levels. Default is 6, as in the original papers.

Returns:

Dictionary containing the percentage of length-3 words of each type:

  • ’pV0’ : percentage of 0V words

  • ’pV1’ : percentage of 1V words

  • ’pV2LV’ : percentage of 2LV words

  • ’pV2UV’ : percentage of 2UV words

Return type:

dict