features/signal_features.py
def range_count_percentage(signal_df, channels, min_value=-1, max_value=1):
    '''
    Calculate range count percentage of sensor signals.

    :param signal_df: Pandas DataFrame housing desired sensor signals
    :param channels: channels of signal to measure range count percentage
    :param min_value: desired minimum value
    :param max_value: desired maximum value
    :return: Pandas DataFrame of calculated range count percentage for each signal channel
    '''
    range_count_df = pd.DataFrame()

    for channel in channels:
        signal_x = signal_df[channel]
        current_range_count = tsf.feature_extraction.feature_calculators.range_count(signal_x, min_value, max_value) * 1.0 / len(signal_x)
        range_count_df[channel + '_range_count_per'] = [current_range_count]

    return range_count_df

    Calculate range count percentage of sensor signals.

    :param signal_df: Pandas DataFrame housing desired sensor signals
    :param channels: channels of signal to measure range count percentage
    :param min_value: desired minimum value
    :param max_value: desired maximum value
    :return: Pandas DataFrame of calculated range count percentage for each signal channel
    
Calculate range count percentage of sensor signals.
Calculate range count percentage of sensor signals .
def range_count_percentage(signal_df, channels, min_value=-1, max_value=1):
    range_count_df = pd.DataFrame()
    for channel in channels:
        signal_x = signal_df[channel]
        current_range_count = tsf.feature_extraction.feature_calculators.range_count(signal_x, min_value, max_value) * 1.0 / len(signal_x)
        range_count_df[channel + '_range_count_per'] = [current_range_count]
    return range_count_df
def range_count_percentage ( signal_df , channels , min_value = - 1 , max_value = 1 ) : range_count_df = pd . DataFrame ( ) for channel in channels : signal_x = signal_df [ channel ] current_range_count = tsf . feature_extraction . feature_calculators . range_count ( signal_x , min_value , max_value ) * 1.0 / len ( signal_x ) range_count_df [ channel + '_range_count_per' ] = [ current_range_count ] return range_count_df
Calculate range count percentage of sensor signals.
Calculate range count percentage of sensor signals .
'''
    Calculate range count percentage of sensor signals.

    :param signal_df: Pandas DataFrame housing desired sensor signals
    :param channels: channels of signal to measure range count percentage
    :param min_value: desired minimum value
    :param max_value: desired maximum value
    :return: Pandas DataFrame of calculated range count percentage for each signal channel
    '''
Pandas DataFrame of calculated range count percentage for each signal channel
Pandas DataFrame of calculated range count percentage for each signal channel
signal_df
Pandas DataFrame housing desired sensor signals
Pandas DataFrame housing desired sensor signals
channels
channels of signal to measure range count percentage
channels of signal to measure range count percentage
min_value
desired minimum value
desired minimum value
max_value
desired maximum value
desired maximum value