features/signal_features.py
def correlation_coefficient(signal_df, channels):
    '''
    Calculate correlation coefficient of sensor signals.

    :param signal_df: Pandas DataFrame housing desired sensor signals
    :param channels: channels of signal to measure correlation coefficient
    :return: Pandas DataFrame of calculated correlation coefficient for each signal channel
    '''
    corr_coef_df = pd.DataFrame()
    C = signal_df.corr()

    for channel in channels:
        corr_coef_df[channel[0] + '_' + channel[1] + '_corr_coef'] = [C[channel[0]][channel[1]]]

    return corr_coef_df

    Calculate correlation coefficient of sensor signals.

    :param signal_df: Pandas DataFrame housing desired sensor signals
    :param channels: channels of signal to measure correlation coefficient
    :return: Pandas DataFrame of calculated correlation coefficient for each signal channel
    
Calculate correlation coefficient of sensor signals.
Calculate correlation coefficient of sensor signals .
def correlation_coefficient(signal_df, channels):
    corr_coef_df = pd.DataFrame()
    C = signal_df.corr()
    for channel in channels:
        corr_coef_df[channel[0] + '_' + channel[1] + '_corr_coef'] = [C[channel[0]][channel[1]]]
    return corr_coef_df
def correlation_coefficient ( signal_df , channels ) : corr_coef_df = pd . DataFrame ( ) C = signal_df . corr ( ) for channel in channels : corr_coef_df [ channel [ 0 ] + '_' + channel [ 1 ] + '_corr_coef' ] = [ C [ channel [ 0 ] ] [ channel [ 1 ] ] ] return corr_coef_df
Calculate correlation coefficient of sensor signals.
Calculate correlation coefficient of sensor signals .
'''
    Calculate correlation coefficient of sensor signals.

    :param signal_df: Pandas DataFrame housing desired sensor signals
    :param channels: channels of signal to measure correlation coefficient
    :return: Pandas DataFrame of calculated correlation coefficient for each signal channel
    '''
Pandas DataFrame of calculated correlation coefficient for each signal channel
Pandas DataFrame of calculated correlation coefficient for each signal channel
signal_df
Pandas DataFrame housing desired sensor signals
Pandas DataFrame housing desired sensor signals
channels
channels of signal to measure correlation coefficient
channels of signal to measure correlation coefficient