How danielzamorap/el4203-proyecto-progra-avanzada-eeg works
This repository is a research-oriented EEG seizure-window classifier. Its workflow is to prepare patient-specific windows from CHB-MIT EDF records using seizure annotations, save channel-power features and labels as NPZ files, then load five patients for training and hold out one patient for evaluation. The two models produce seizure scores that metrics summarize and the MLP uses to prioritize review windows; the script also saves an ROC plot. The graph reflects the shown entry points and module calls; it does not assume unsampled notebook or raw-data details.
Main entry points: main.py Train-test runner · metricas.py Model metrics · preparar_datos.py Patient preparation · datos.py Patient datasets
Components 14
Data preparation
- Seizure annotations
src/anotaciones.py - Patient preparation
src/preparar_datos.py
Dataset handling
- EEG window features
src/datos.py - Patient datasets
src/datos.py - Processed NPZ files
data/processed
Modeling and evaluation
- Train-test runner
src/main.py - Threshold model
src/modelos.py - Neural network
src/modelos.py - Score sorting
src/ordenamiento.py - Model metrics
src/metricas.py
Review outputs
- Prioritized windows
src/main.py - ROC plot
resultados
Other components
- Analyst
- CHB-MIT EDF
Connections 19
- Analyst → Train-test runner: runs
README.md - Analyst → Patient preparation: prepares data
src/preparar_datos.py - CHB-MIT EDF → Patient preparation: supplies records
README.md - Patient preparation → Seizure annotations: reads annotations
src/preparar_datos.py - Patient preparation → EEG window features: adds records
src/preparar_datos.py - EEG window features → Processed NPZ files: saves features
src/datos.py - Patient datasets → Processed NPZ files: loads patients
src/datos.py - Train-test runner → Patient datasets: loads patients
src/main.py - Train-test runner → Threshold model: trains and scores
src/main.py - Train-test runner → Neural network: trains and scores
src/main.py - Train-test runner → Model metrics: evaluates models
src/main.py - Model metrics → Patient datasets: reads labels and features
src/metricas.py - Model metrics → Threshold model: requests predictions
src/metricas.py - Model metrics → Neural network: requests scores
src/metricas.py - Neural network → Score sorting: orders scores
src/modelos.py - Train-test runner → Patient datasets: gets window origins
src/main.py - Train-test runner → Neural network: prioritizes windows
src/main.py - Train-test runner → Prioritized windows: prints top windows
src/main.py - Train-test runner → ROC plot: saves ROC plot
src/main.py