Skip to content

[WIP] Wesad contrastive eda#969

Draft
msaunders804 wants to merge 6 commits intosunlabuiuc:masterfrom
msaunders804:wesad-contrastive-eda
Draft

[WIP] Wesad contrastive eda#969
msaunders804 wants to merge 6 commits intosunlabuiuc:masterfrom
msaunders804:wesad-contrastive-eda

Conversation

@msaunders804
Copy link
Copy Markdown

Summary

Reproduces "Contrastive Learning of Electrodermal Activity Representations
for Stress Detection" (Matton et al., CHIL 2023) as a full PyHealth pipeline.

Changes

  • pyhealth/datasets/wesad.py: WESAD dataset class with EDA windowing and
    subject-level loading
  • pyhealth/tasks/stress_detection.py: Stress detection task with LNSO
    cross-validation split support
  • pyhealth/models/contrastive_eda.py: Contrastive EDA encoder with SimCLR-style
    pre-training, NT-Xent loss, and EDA-specific augmentations
  • examples/wesad_stress_detection_contrastive_eda.py: Full pipeline example
    with augmentation ablation study

Ablation Results (1% labeled data, 5-fold LNSO)

Augmentation Group Mean Balanced Acc Std
Full [from Colab run]
Generic only [from Colab run]
EDA-specific only [from Colab run]

Tests

  • 7 dataset tests
  • 7 task tests
  • 21 model tests
    All passing.

Paper

Matton et al. (2023). Contrastive Learning of Electrodermal Activity
Representations for Stress Detection. CHIL 2023. PMLR 209:410-426.

…example

- pyhealth/datasets/wesad.py: WESAD dataset class with EDA windowing
- pyhealth/tasks/stress_detection.py: Stress detection task with LNSO splits
- pyhealth/models/contrastive_eda.py: SimCLR contrastive encoder with NT-Xent loss and EDA augmentations
- examples/wesad_stress_detection_contrastive_eda.py: Full pipeline with augmentation ablation
- tests: 35 tests covering dataset, task, and model

Reproduces Matton et al. CHIL 2023.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant