Spaces:
Sleeping
Sleeping
File size: 1,574 Bytes
24a5e7e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | # 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:
1. **Imports and CFG** β single config dict, project root setup
2. **ClearML (optional)** β opt-in experiment tracking
3. **Data loading** β uses `data_preparation.prepare_dataset` for consistent loading
4. **Random split training** β 70/15/15 stratified split with per-epoch/round logging
5. **Loss curves** β train vs validation loss plots
6. **Test evaluation** β accuracy, F1, ROC-AUC, classification report, confusion matrix
7. **Checkpoint saving** β model weights + JSON training log
8. **LOPO evaluation** β Leave-One-Person-Out cross-validation across all 9 participants
9. **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:
```bash
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 |
|