How to use the tsfresh.feature_extraction.feature_calculators.approximate_entropy function in tsfresh

To help you get started, we’ve selected a few tsfresh examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pdkit / pdkit / pdkit / tremor_processor.py View on Github external
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