Skip to content

Code for the paper "Seamless Monitoring of Stress Levels Leveraging a Universal Model for Time Sequences".

Notifications You must be signed in to change notification settings

davegabe/Wearable-Stress-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wearable Abnormal Emotion Detection

This repository contains the code for the paper "Seamless Monitoring of Stress Levels Leveraging a Universal Model for Time Sequences".

Results

Comparison of Different Methods

DREAMER HCI WESAD (ECG) WESAD (BVP) AVG F1
LSTM-NDT 0.313 0.375 0.785 0.772 0.561 ± .218
OmniAnomaly 0.599 0.547 0.767 0.650 0.641 ± .081
CAE-M 0.658 0.530 0.801 0.590 0.645 ± .101
HypAD 0.650 0.643 0.815 0.567 0.669 ± .090
MTAD-GAT 0.536 0.742 0.857 0.719 0.714 ± .115
TranAD 0.617 0.623 0.837 0.804 0.720 ± .101
TadGAN 0.590 0.691 0.864 0.743 0.722 ± .099
GDN 0.713 0.580 0.858 0.802 0.738 ± .105
DAGMM 0.743 0.647 0.831 0.773 0.749 ± .067
USAD 0.730 0.660 0.830 0.797 0.754 ± .065
MAD-GAN 0.706 0.743 0.839 0.787 0.769 ± .050
MSCRED 0.675 0.824 0.876 0.775 0.788 ± .074
UniTS 0.869 0.878 0.834 0.856 0.859 ± .019

P-values from Dunn Post-hoc Test

UniTS
MSCRED $2.813 \times 10^{-2}$
MAD-GAN $4.795 \times 10^{-3}$
USAD $6.839 \times 10^{-3}$
DAGMM $1.136 \times 10^{-3}$
GDN $5.146 \times 10^{-3}$

Setup

The following command installs the required dependencies:

# Install the dependencies
pip install -r requirements.txt

Datasets and Preprocessing

The following datasets are used in this project:

The datasets are preprocessed using the following steps:

# Download and extract the datasets
./data/download-datasets.sh

# Preprocess the datasets
python preprocess.py

Training

Ensure to be logged and to set your WANDB_USER in the file run.py to log the results to Weights & Biases. The following command launches the training of the models:

# Train the models
python run.py

Evaluation

The evaluation results are processed from logged runs on Weights & Biases. To retrieve the evaluation results, run the following command:

# Evaluate the models
python results.py

Acknowledgements

This project use the code from the repositiories of UniTS, TranAD and HypAD for the implementation of the models.

About

Code for the paper "Seamless Monitoring of Stress Levels Leveraging a Universal Model for Time Sequences".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published