Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def time_series_has_duplicate_min(x):
"""
Checks if the minimal value of x is observed more than once
:param x: the time series to calculate the feature of
:type x: pandas.Series
:return: the value of this feature
:return type: bool
"""
return ts_feature_calculators.has_duplicate_min(x)
def time_series_skewness(x):
"""
Returns the sample skewness of x (calculated with the adjusted Fisher-Pearson standardized
moment coefficient G1).
:param x: the time series to calculate the feature of
:type x: pandas.Series
:return: the value of this feature
:return type: float
"""
return ts_feature_calculators.skewness(x)
def time_series_standard_deviation(x):
"""
Returns the standard deviation of x
:param x: the time series to calculate the feature of
:type x: pandas.Series
:return: the value of this feature
:return type: float
"""
return ts_feature_calculators.standard_deviation(x)
predict :math:`x_t` whereas in (b), future values are used to calculate the past value :math:`x_{t-k}`.\
It is said in :cite:`Wilson2015` that "for an AR(p), the partial autocorrelations [ :math:`\\alpha_k` ] \
will be nonzero for `k<=p` and zero for `k>p`."\
With this property, it is used to determine the lag of an AR-Process.
:param x: the time series to calculate the feature of
:type x: pandas.Series
:param param: contains dictionaries {"lag": val} with int val indicating the lag to be returned
:type param: list
:return: the value of this feature
:rtype: float
"""
if param is None:
param = [{'lag': 3}, {'lag': 5}, {'lag': 6}]
_partialc = feature_calculators.partial_autocorrelation(x, param)
logging.debug("partial autocorrelation by tsfresh calculated")
return _partialc
def time_series_has_duplicate(x):
"""
Checks if any value in x occurs more than once
:param x: the time series to calculate the feature of
:type x: pandas.Series
:return: the value of this feature
:return type: bool
"""
return ts_feature_calculators.has_duplicate(x)