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: | |
| 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 | | |