This repository contains the code for the paper "Seamless Monitoring of Stress Levels Leveraging a Universal Model for Time Sequences".
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 |
UniTS | |
---|---|
MSCRED | |
MAD-GAN | |
USAD | |
DAGMM | |
GDN |
The following command installs the required dependencies:
# Install the dependencies
pip install -r requirements.txt
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
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
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
This project use the code from the repositiories of UniTS, TranAD and HypAD for the implementation of the models.