Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
but should be stable for N > 2000, see :cite:`Yentes2013`. Other shortcomings and alternatives discussed in \
:cite:`Richman2000`
:param x: the time series to calculate the feature of
:type x: pandas.Series
:param m: Length of compared run of data
:type m: int
:param r: Filtering level, must be positive
:type r: float
:return: Approximate entropy
:rtype: float
"""
if m is None or r is None:
m = 2
r = 0.3
entropy = feature_calculators.approximate_entropy(x, m, r)
logging.debug("approximate entropy by tsfresh calculated")
return entropy
def function(x):
return approximate_entropy(x, m=self.m, r=self.r)