How to use the tsfresh.feature_extraction.feature_calculators.fft_coefficient 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
The resulting coefficients will be complex, this feature calculator can return the real part (attr=="real"), \
        the imaginary part (attr=="imag), the absolute value (attr=""abs) and the angle in degrees (attr=="angle).

        :param x: the time series to calculate the feature of
        :type x: pandas.Series
        :param param: contains dictionaries {"coeff": x, "attr": s} with x int and x >= 0, s str and in ["real", "imag"\
        , "abs", "angle"]
        :type param: list
        :return: the different feature values
        :rtype: pandas.Series
        """
        if param is None:
            param = [{'attr': 'abs', 'coeff': 44}, {'attr': 'abs', 'coeff': 63}, {'attr': 'abs', 'coeff': 0},
                     {'attr': 'real', 'coeff': 0}, {'attr': 'real', 'coeff': 23}]
        _fft_coef = feature_calculators.fft_coefficient(x, param)
        logging.debug("fft coefficient by tsfresh calculated")
        return list(_fft_coef)
github FeatureLabs / featuretools-tsfresh-primitives / featuretools_tsfresh_primitives / primitives / fft_coefficient.py View on Github external
def function(x):
            param = [{'coeff': self.coeff, 'attr': self.attr}]
            return list(fft_coefficient(x, param=param))[0][1]