Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
def function(x):
param = [{'coeff': self.coeff, 'attr': self.attr}]
return list(fft_coefficient(x, param=param))[0][1]