pyhctsa.operations.distribution.proportion_values

pyhctsa.operations.distribution.proportion_values(x, prop_what='positive')

Calculate the proportion of values meeting specific conditions in a time series.

Parameters:
x : array-like

Input time series or data vector

prop_what : str, optional (default is 'positive')

Type of values to count:

  • ’zeros’: values equal to zero

  • ’positive’: values strictly greater than zero

  • ’geq0’: values greater than or equal to zero

Returns:

Proportion of values meeting the specified condition.

Return type:

float