Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
As in tsfresh `fft_aggregated `_
Returns the spectral centroid (mean), variance, skew, and kurtosis of the absolute fourier transform spectrum.
:param x: the time series to calculate the feature of
:type x: pandas.Series
:param param: contains dictionaries {"aggtype": s} where s str and in ["centroid", "variance",
"skew", "kurtosis"]
:type param: list
:return: the different feature values
:rtype: pandas.Series
"""
if param is None:
param = [{'aggtype': 'centroid'}]
_fft_agg = feature_calculators.fft_aggregated(x, param)
logging.debug("fft aggregated by tsfresh calculated")
return list(_fft_agg)
def function(x):
param = [{'aggtype': self.aggtype}]
return list(fft_aggregated(x, param=param))[0][1]