How to use the tsfresh.feature_extraction.feature_calculators.percentage_of_reoccurring_datapoints_to_all_datapoints 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
"""
        As in tsfresh `percentage_of_reoccurring_datapoints_to_all_datapoints `_ \

        Returns the percentage of unique values, that are present in the time series more than once.\
        len(different values occurring more than once) / len(different values)\
        This means the percentage is normalized to the number of unique values, in contrast to the \
        percentage_of_reoccurring_values_to_all_values.


        :param x: the time series to calculate the feature of
        :type x: pandas.Series
        :return: the value of this feature
        :rtype: float
        """
        _perc = feature_calculators.percentage_of_reoccurring_datapoints_to_all_datapoints(x)
        logging.debug("percentage of reoccurring datapoints to all datapoints by tsfresh calculated")
        return _perc
github Tencent / Metis / time_series_detector / feature / statistical_features.py View on Github external
def time_series_percentage_of_reoccurring_datapoints_to_all_datapoints(x):
    """
    Returns the percentage of unique values, that are present in the time series
    more than once.

        len(different values occurring more than once) / len(different values)

    This means the percentage is normalized to the number of unique values,
    in contrast to the percentage_of_reoccurring_values_to_all_values.

    :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.percentage_of_reoccurring_datapoints_to_all_datapoints(x)