Spaces:
Sleeping
Sleeping
notebooks/
Training and evaluation notebooks for MLP and XGBoost models.
1. Files
| Notebook | Model | Description |
|---|---|---|
mlp.ipynb |
PyTorch MLP | Training, evaluation, and LOPO cross-validation |
xgboost.ipynb |
XGBoost | Training, evaluation, and LOPO cross-validation |
2. Structure (both notebooks)
Each notebook follows the same layout:
- Imports and CFG β single config dict, project root setup
- ClearML (optional) β opt-in experiment tracking
- Data loading β uses
data_preparation.prepare_datasetfor consistent loading - Random split training β 70/15/15 stratified split with per-epoch/round logging
- Loss curves β train vs validation loss plots
- Test evaluation β accuracy, F1, ROC-AUC, classification report, confusion matrix
- Checkpoint saving β model weights + JSON training log
- LOPO evaluation β Leave-One-Person-Out cross-validation across all 9 participants
- LOPO summary β per-person accuracy table + bar chart
3. Running
Open in Jupyter or VS Code with the Python kernel set to the project venv:
source venv/bin/activate
jupyter notebook notebooks/mlp.ipynb
Make sure the kernel's working directory is either the project root or notebooks/ β the path resolution handles both.
4. Results
| Model | Random Split Accuracy | Random Split F1 | LOPO (mean) |
|---|---|---|---|
| XGBoost | 95.87% | 0.959 | see notebook |
| MLP | 92.92% | 0.929 | see notebook |