Changes after thorough testing with available data.
parent
c1564f0cae
commit
6864cfe775
22
config.yaml
22
config.yaml
|
@ -3,7 +3,7 @@
|
|||
########################################################################################################################
|
||||
|
||||
# See https://www.rapids.science/latest/setup/configuration/#participant-files
|
||||
PIDS: [p01] #, p02]
|
||||
PIDS: [p01, p02]
|
||||
|
||||
# See https://www.rapids.science/latest/setup/configuration/#automatic-creation-of-participant-files
|
||||
CREATE_PARTICIPANT_FILES:
|
||||
|
@ -477,7 +477,7 @@ EMPATICA_ACCELEROMETER:
|
|||
CONTAINER: ACC
|
||||
PROVIDERS:
|
||||
DBDP:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ["maxmagnitude", "minmagnitude", "avgmagnitude", "medianmagnitude", "stdmagnitude"]
|
||||
SRC_SCRIPT: src/features/empatica_accelerometer/dbdp/main.py
|
||||
CR:
|
||||
|
@ -502,7 +502,7 @@ EMPATICA_HEARTRATE:
|
|||
CONTAINER: HR
|
||||
PROVIDERS:
|
||||
DBDP:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ["maxhr", "minhr", "avghr", "medianhr", "modehr", "stdhr", "diffmaxmodehr", "diffminmodehr", "entropyhr"]
|
||||
SRC_SCRIPT: src/features/empatica_heartrate/dbdp/main.py
|
||||
|
||||
|
@ -511,7 +511,7 @@ EMPATICA_TEMPERATURE:
|
|||
CONTAINER: TEMP
|
||||
PROVIDERS:
|
||||
DBDP:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ["maxtemp", "mintemp", "avgtemp", "mediantemp", "modetemp", "stdtemp", "diffmaxmodetemp", "diffminmodetemp", "entropytemp"]
|
||||
SRC_SCRIPT: src/features/empatica_temperature/dbdp/main.py
|
||||
CR:
|
||||
|
@ -532,18 +532,18 @@ EMPATICA_ELECTRODERMAL_ACTIVITY:
|
|||
CONTAINER: EDA
|
||||
PROVIDERS:
|
||||
DBDP:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ["maxeda", "mineda", "avgeda", "medianeda", "modeeda", "stdeda", "diffmaxmodeeda", "diffminmodeeda", "entropyeda"]
|
||||
SRC_SCRIPT: src/features/empatica_electrodermal_activity/dbdp/main.py
|
||||
CR:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ['mean', 'std', 'q25', 'q75', 'qd', 'deriv', 'power', 'numPeaks', 'ratePeaks', 'powerPeaks', 'sumPosDeriv', 'propPosDeriv', 'derivTonic',
|
||||
'sigTonicDifference', 'freqFeats','maxPeakAmplitudeChangeBefore', 'maxPeakAmplitudeChangeAfter', 'avgPeakAmplitudeChangeBefore',
|
||||
'avgPeakAmplitudeChangeAfter', 'avgPeakChangeRatio', 'maxPeakIncreaseTime', 'maxPeakDecreaseTime', 'maxPeakDuration', 'maxPeakChangeRatio',
|
||||
'avgPeakIncreaseTime', 'avgPeakDecreaseTime', 'avgPeakDuration', 'maxPeakResponseSlopeBefore', 'maxPeakResponseSlopeAfter',
|
||||
'signalOverallChange', 'changeDuration', 'changeRate', 'significantIncrease', 'significantDecrease']
|
||||
WINDOWS:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
WINDOW_LENGTH: 300 # specify window length in seconds
|
||||
SECOND_ORDER_FEATURES: ['mean', 'median', 'sd', 'max', 'min']
|
||||
SRC_SCRIPT: src/features/empatica_electrodermal_activity/cr/main.py
|
||||
|
@ -553,11 +553,11 @@ EMPATICA_BLOOD_VOLUME_PULSE:
|
|||
CONTAINER: BVP
|
||||
PROVIDERS:
|
||||
DBDP:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ["maxbvp", "minbvp", "avgbvp", "medianbvp", "modebvp", "stdbvp", "diffmaxmodebvp", "diffminmodebvp", "entropybvp"]
|
||||
SRC_SCRIPT: src/features/empatica_blood_volume_pulse/dbdp/main.py
|
||||
CR:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ['meanHr', 'ibi', 'sdnn', 'sdsd', 'rmssd', 'pnn20', 'pnn50', 'sd', 'sd2', 'sd1/sd2', 'numRR', # Time features
|
||||
'VLF', 'LF', 'LFnorm', 'HF', 'HFnorm', 'LF/HF', 'fullIntegral'] # Freq features
|
||||
WINDOWS:
|
||||
|
@ -571,11 +571,11 @@ EMPATICA_INTER_BEAT_INTERVAL:
|
|||
CONTAINER: IBI
|
||||
PROVIDERS:
|
||||
DBDP:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ["maxibi", "minibi", "avgibi", "medianibi", "modeibi", "stdibi", "diffmaxmodeibi", "diffminmodeibi", "entropyibi"]
|
||||
SRC_SCRIPT: src/features/empatica_inter_beat_interval/dbdp/main.py
|
||||
CR:
|
||||
COMPUTE: False
|
||||
COMPUTE: True
|
||||
FEATURES: ['meanHr', 'ibi', 'sdnn', 'sdsd', 'rmssd', 'pnn20', 'pnn50', 'sd', 'sd2', 'sd1/sd2', 'numRR', # Time features
|
||||
'VLF', 'LF', 'LFnorm', 'HF', 'HFnorm', 'LF/HF', 'fullIntegral'] # Freq features
|
||||
WINDOWS:
|
||||
|
|
|
@ -20,22 +20,6 @@ def extract_acc_features_from_intraday_data(acc_intraday_data, features, window_
|
|||
|
||||
acc_intraday_features = pd.DataFrame()
|
||||
|
||||
# # apply methods from calculate features module
|
||||
# if window_length is None:
|
||||
# acc_intraday_features = \
|
||||
# acc_intraday_data.groupby('local_segment').apply(lambda x: calculateFeatures( \
|
||||
# convert_to2d(x['double_values_0'], x.shape[0]), \
|
||||
# convert_to2d(x['double_values_1'], x.shape[0]), \
|
||||
# convert_to2d(x['double_values_2'], x.shape[0]), \
|
||||
# fs=sample_rate, featureNames=features))
|
||||
# else:
|
||||
# acc_intraday_features = \
|
||||
# acc_intraday_data.groupby('local_segment').apply(lambda x: calculateFeatures( \
|
||||
# convert_to2d(x['double_values_0'], window_length*sample_rate), \
|
||||
# convert_to2d(x['double_values_1'], window_length*sample_rate), \
|
||||
# convert_to2d(x['double_values_2'], window_length*sample_rate), \
|
||||
# fs=sample_rate, featureNames=features))
|
||||
|
||||
# apply methods from calculate features module
|
||||
if window_length is None:
|
||||
acc_intraday_features = \
|
||||
|
@ -43,14 +27,14 @@ def extract_acc_features_from_intraday_data(acc_intraday_data, features, window_
|
|||
convert_to2d(x['double_values_0'], x.shape[0]), \
|
||||
convert_to2d(x['double_values_1'], x.shape[0]), \
|
||||
convert_to2d(x['double_values_2'], x.shape[0]), \
|
||||
fs=sample_rate, feature_names=features))
|
||||
fs=sample_rate, feature_names=features, show_progress=False))
|
||||
else:
|
||||
acc_intraday_features = \
|
||||
acc_intraday_data.groupby('local_segment').apply(lambda x: calculate_features( \
|
||||
convert_to2d(x['double_values_0'], window_length*sample_rate), \
|
||||
convert_to2d(x['double_values_1'], window_length*sample_rate), \
|
||||
convert_to2d(x['double_values_2'], window_length*sample_rate), \
|
||||
fs=sample_rate, feature_names=features))
|
||||
fs=sample_rate, feature_names=features, show_progress=False))
|
||||
|
||||
acc_intraday_features.reset_index(inplace=True)
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ def extract_bvp_features_from_intraday_data(bvp_intraday_data, features, window_
|
|||
lambda x:
|
||||
extract_hrv_features_2d_wrapper(
|
||||
convert_to2d(x['blood_volume_pulse'], x.shape[0]),
|
||||
sampling=sample_rate, hampel_fiter=False, median_filter=False, mod_z_score_filter=False, feature_names=features))
|
||||
sampling=sample_rate, hampel_fiter=False, median_filter=False, mod_z_score_filter=True, feature_names=features))
|
||||
|
||||
else:
|
||||
bvp_intraday_features = \
|
||||
|
|
|
@ -20,25 +20,15 @@ def extract_temp_features_from_intraday_data(temperature_intraday_data, features
|
|||
|
||||
temperature_intraday_features = pd.DataFrame()
|
||||
|
||||
# apply methods from calculate features module
|
||||
# if window_length is None:
|
||||
# temperature_intraday_features = \
|
||||
# temperature_intraday_data.groupby('local_segment').apply(\
|
||||
# lambda x: calculateFeatures(convert_to2d(x['temperature'], x.shape[0]), fs=sample_rate, featureNames=features))
|
||||
# else:
|
||||
# temperature_intraday_features = \
|
||||
# temperature_intraday_data.groupby('local_segment').apply(\
|
||||
# lambda x: calculateFeatures(convert_to2d(x['temperature'], window_length*sample_rate), fs=sample_rate, featureNames=features))
|
||||
|
||||
# apply methods from calculate features module
|
||||
if window_length is None:
|
||||
temperature_intraday_features = \
|
||||
temperature_intraday_data.groupby('local_segment').apply(\
|
||||
lambda x: calculate_features(convert_to2d(x['temperature'], x.shape[0]), fs=sample_rate, feature_names=features))
|
||||
lambda x: calculate_features(convert_to2d(x['temperature'], x.shape[0]), fs=sample_rate, feature_names=features, show_progress=False))
|
||||
else:
|
||||
temperature_intraday_features = \
|
||||
temperature_intraday_data.groupby('local_segment').apply(\
|
||||
lambda x: calculate_features(convert_to2d(x['temperature'], window_length*sample_rate), fs=sample_rate, feature_names=features))
|
||||
lambda x: calculate_features(convert_to2d(x['temperature'], window_length*sample_rate), fs=sample_rate, feature_names=features, show_progress=False))
|
||||
|
||||
|
||||
temperature_intraday_features.reset_index(inplace=True)
|
||||
|
|
Loading…
Reference in New Issue