Framework to select the optimal micro-EMA question that can be asked multiple times a day, this question has a high correlation with the physiological manifestation.
The data is taken from here
- processed.csv: each row contains features from 1 minute intervals
- labeledfeatures.csv: same as processed.csv but it has details of the micro-ema responses as well
- annotations.csv: 21 rows containing details about the activities and their corresponding timestamps
- elec.csv: contains the raw data (timestamp, voltage)
- In labeledfeatures.csv the ema responses are given but they there are no entries for TSST rest and cry rest. The ema responses are the same for all the cry activities
- Removed the following from In-lab dataset
- removed P9 because the data doesn't mention event type
- removed p18 because
labeledfeatures.csv
not present
- Removed the following from In-Wild Dataset
- P101, P107, P111, P112, P113, P114 were removed because of negative Sample voltage.
pipenv -r install requirements.txt
- To select the candidate EMAs that have high biserial-correlation with intended stressors.
python ema_stressors_correlation.py
- The correlation plot of all EMAs with intended stressors is saved at
/Plots/Correlation_ema_intended.png
- Run
train_chunk_features.ipynb
- This notebook creates the following hand-crafted features:
Signal | Features |
---|---|
Heart-rate Variability | Low freq. energy (0.1-0.2Hz), RMSSD, SDSD |
Non-heart-rate variability | Mean, Mode, Minimum, Range, |
-
These features are then used to train SVM, Decision Tree, Gradient Boosting, and AdaBoost.
-
The results after validating the models using LOSO are written to
Results/loso_chunks.csv
.
- To run the tensorflow model and validate it using LOSO
python train_chunk_loso.py
- To train the model on entire In-Lab data
python train_chunk.py
- The best model checkpoint will be written to
chkpts/v4(2)
- Run
testing_inwild.ipynb
. - This notebook generates accuracy plots for top 3 EMAs obtained after EMA selection over varying window lengths.
- All the plots are saved at
Plots/In-Wild