pastas.stats.signatures.colwell_constancy#

colwell_constancy(series, bins=11, freq='M', method='mean', normalize=True)[source]#

Colwells constancy index after [colwell_1974].

Parameters
  • series (pandas.Series) – Pandas Series with DatetimeIndex and head values.

  • bins (int) – number of bins to determine the states of the groundwater.

  • freq (str, optional) – frequency to resample the series to.

  • method (str, optional) – Method to use for resampling. Only “mean” is allowed now.

  • normalize (bool, optional) – normalize the time series to values between zero and one.

Returns

p, c, m – predictability, constancy, contingency

Return type

float, float, float

Notes

One minus the sum of entropy with respect to state, divided by the logarithm of the absolute number of possible states.

References

colwell_1974

Colwell, R. K. (1974). Predictability Constancy and Contingency of periodic phenomena. Ecology, 55(5), 1148–1153.