features/signal_features.py
def iqr_of_autocovariance(signal_df, channels):
    '''
    Calculate interquartile range of autocovariance of sensor signals.
    
    :param signal_df: Pandas DataFrame housing sensor signals
    :param channels: channels of signal to obtain IQR of autocovariance
    :return: Pandas DataFrame of calculated IQR of autocovariance for each signal channel
    '''
    autocov_range_df = pd.DataFrame()

    n_samples = signal_df.shape[0]
    for channel in channels:
        current_autocov_iqr = stats.iqr(acf(signal_df[channel], unbiased=True, nlags=n_samples/2))
        autocov_range_df[channel + '_iqr_of_autocovariance'] = [current_autocov_iqr]

    return autocov_range_df

    Calculate interquartile range of autocovariance of sensor signals.
    
    :param signal_df: Pandas DataFrame housing sensor signals
    :param channels: channels of signal to obtain IQR of autocovariance
    :return: Pandas DataFrame of calculated IQR of autocovariance for each signal channel
    
Calculate interquartile range of autocovariance of sensor signals.
Calculate interquartile range of autocovariance of sensor signals .
def iqr_of_autocovariance(signal_df, channels):
    autocov_range_df = pd.DataFrame()
    n_samples = signal_df.shape[0]
    for channel in channels:
        current_autocov_iqr = stats.iqr(acf(signal_df[channel], unbiased=True, nlags=n_samples/2))
        autocov_range_df[channel + '_iqr_of_autocovariance'] = [current_autocov_iqr]
    return autocov_range_df
def iqr_of_autocovariance ( signal_df , channels ) : autocov_range_df = pd . DataFrame ( ) n_samples = signal_df . shape [ 0 ] for channel in channels : current_autocov_iqr = stats . iqr ( acf ( signal_df [ channel ] , unbiased = True , nlags = n_samples / 2 ) ) autocov_range_df [ channel + '_iqr_of_autocovariance' ] = [ current_autocov_iqr ] return autocov_range_df
Calculate interquartile range of autocovariance of sensor signals.
Calculate interquartile range of autocovariance of sensor signals .
'''
    Calculate interquartile range of autocovariance of sensor signals.
    
    :param signal_df: Pandas DataFrame housing sensor signals
    :param channels: channels of signal to obtain IQR of autocovariance
    :return: Pandas DataFrame of calculated IQR of autocovariance for each signal channel
    '''
Pandas DataFrame of calculated IQR of autocovariance for each signal channel
Pandas DataFrame of calculated IQR of autocovariance for each signal channel
signal_df
Pandas DataFrame housing sensor signals
Pandas DataFrame housing sensor signals
channels
channels of signal to obtain IQR of autocovariance
channels of signal to obtain IQR of autocovariance