A dual-dataset machine learning framework that detects student stress from wrist-worn physiological signals and automatically prescribes personalised sound and haptic interventions.
| Metric | Value |
|---|---|
| Overall Accuracy | 91.33% |
| Stress F1-Score | 0.940 |
| Baseline F1-Score | 0.935 |
| Amusement F1-Score | 0.787 |
| CV Std Deviation | ±0.026 |
| Subjects Trained On | 15 (WESAD) |
- Detects student stress state — Baseline, Stress, or Amusement — from wrist EDA, BVP, and skin temperature signals
- Maps detected state to an emotion zone using cross-dataset bridge analysis between WESAD and DEAP
- Generates and plays a real-time personalised alpha binaural beat intervention using NumPy sine wave synthesis
- Prescribes haptic feedback parameters for wearable device deployment
Wrist Sensor Data (EDA · BVP · Temperature) ↓ Feature Extraction (10 features per 60s window) ↓ Random Forest Classifier (91.33% accuracy) ↓ Emotion Zone Mapping (WESAD → DEAP Bridge) ↓ Sound + Haptic Prescription
| Component | Tool |
|---|---|
| Language | Python 3.10 |
| Machine Learning | Scikit-learn |
| Signal Processing | SciPy, NumPy |
| Web Application | Streamlit |
| Visualisation | Plotly |
| Data Handling | Pandas |
| Sound Generation | NumPy + Wave |
| Environment | WSL2 Ubuntu 22.04 |
WESAD — Wearable Stress and Affect Detection
- 15 subjects wearing Empatica E4 wristband
- Signals: BVP (64Hz), EDA (4Hz), Temperature (4Hz)
- Labels: Baseline, Stress, Amusement
- Stress induced via Trier Social Stress Test
DEAP — Database for Emotion Analysis
- 32 subjects, audio-evoked emotional responses
- Labels: Valence (1-9), Arousal (1-9)
- Used for emotion zone mapping and intervention prescription
- 4 quadrants: HVLA, HVHA, LVHA, LVLA
FDS_Project/ ├── app/ │ └── streamlit_app.py # Live demo application ├── src/ │ ├── load_wesad.py # WESAD data loader │ ├── load_deap.py # DEAP data loader │ ├── features.py # Feature extraction │ ├── model.py # Model training and evaluation │ ├── intervention.py # Sound and haptic mapping │ └── bridge.py # Cross-dataset bridge analysis ├── models/ │ ├── stress_classifier.pkl │ └── scaler.pkl ├── requirements.txt └── README.md
# Clone the repository
git clone https://github.com/zmkali/FDS_Project.git
cd FDS_Project
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the application
streamlit run app/streamlit_app.pyOpen browser at http://localhost:8501
Note: WESAD and DEAP datasets are not included in this repository due to size. Download WESAD from UCI ML Repository and DEAP from QMUL.
- Live Simulator — Adjust EDA, Heart Rate, and Temperature sliders to simulate wearable readings and get instant stress predictions
- Real Subject Data — Load actual WESAD recordings and view EDA and BVP signal graphs
- Binaural Beat Generation — System generates real alpha binaural beats dynamically using NumPy. No pre-recorded audio files
- Real Metrics — Section 4 computes confusion matrix, feature importance, and F1 scores live from the trained model
- Schmidt et al. (2018) WESAD, ICMI
- Koelstra et al. (2012) DEAP, IEEE Transactions on Affective Computing
- Colzato et al. (2017) Binaural Beats and Attentional Focus
- Zhou et al. (2020) Calming Effect of Heartbeat Vibration
| Member | Contribution |
|---|---|
| Ridhwan Ahamed | Project lead, datasets, proposal |
| Tarun | Model training, feature engineering, results |
| Aaqib | Block diagram, bridge analysis, architecture |
| Zayaan | Streamlit app, demo, sound generation |
BITS Pilani Dubai Campus | Foundation of Data Science | 2026