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