How chahmed12/eeg-absence-detection works
EEG Absence Detection turns annotated multichannel EEG recordings into seizure-event intervals, evaluated by patient-held-out validation and presented through a Streamlit demo. The documented workflow is signal loading and causal filtering, annotation/window labeling, feature or raw-window modeling, temporal postprocessing, then event-level evaluation and visualization. Separate experimental branches cover LightGBM and deep-learning models, including EEGNet and threshold selection. Source excerpts establish several module calls; broader pipeline-stage links rely on the README, so unsampled implementation details are not expanded.
Main entry points: io.py Signal and annotation I/O · postprocess.py Event reconstruction · evaluation.py Event evaluation · verify_three_checks.py Validation checks
Components 19
Data and targets
- EEG recordings
- Seizure annotations
- Signal and annotation I/O
src/io.py - Sample labeling
src/labeling.py
Signal preparation
- Pipeline configuration
src/config.py - Causal filtering
src/preprocess.py - Window generation
src/windowing.py - EEG features
src/features.py
Detection models
- Classical models
src/models.py - Deep learning
src/deep_learning.py - Nested LightGBM
scripts/scripts_step6_exp00_lightgbm_nested.py - EEGNet experiment
scripts/scripts_step6_exp03_eegnet.py - Threshold selection
scripts/scripts_step6_exp04_threshold.py
Assessment and results
- Validation checks
scripts/verify_three_checks.py - Event reconstruction
src/postprocess.py - Event evaluation
src/evaluation.py - EEG visualization
src/viz.py
Interactive demo
- Streamlit demo
app/streamlit_app.py
Other components
- Analyst
Connections 34
- Analyst → Streamlit demo: opens demo
README.md - EEG recordings → Signal and annotation I/O: loads
README.md - Seizure annotations → Signal and annotation I/O: loads and audits
src/io.py - Signal and annotation I/O → Causal filtering: filters signal
src/io.py - Pipeline configuration → Signal and annotation I/O: configures paths
src/config.py - Signal and annotation I/O → Sample labeling: supplies annotations
README.md - Sample labeling → Window generation: labels windows
README.md - Causal filtering → EEG features: prepares signal
README.md - Window generation → EEG features: segments signal
src/features.py - EEG features → Classical models: provides features
README.md - Window generation → Deep learning: provides raw windows
src/deep_learning.py - Nested LightGBM → Classical models: uses models
scripts/scripts_step6_exp00_lightgbm_nested.py - Nested LightGBM → Event evaluation: evaluates folds
scripts/scripts_step6_exp00_lightgbm_nested.py - Nested LightGBM → Signal and annotation I/O: loads recordings
scripts/scripts_step6_exp00_lightgbm_nested.py - Nested LightGBM → Event reconstruction: reconstructs events
scripts/scripts_step6_exp00_lightgbm_nested.py - EEGNet experiment → Deep learning: uses network
scripts/scripts_step6_exp03_eegnet.py - EEGNet experiment → Event evaluation: evaluates folds
scripts/scripts_step6_exp03_eegnet.py - EEGNet experiment → Signal and annotation I/O: loads recordings
scripts/scripts_step6_exp03_eegnet.py - EEGNet experiment → Event reconstruction: reconstructs events
scripts/scripts_step6_exp03_eegnet.py - Threshold selection → Event reconstruction: selects thresholds
scripts/scripts_step6_exp04_threshold.py - Threshold selection → Event evaluation: scores events
scripts/scripts_step6_exp04_threshold.py - Classical models → Event reconstruction: scores windows
- Deep learning → Event reconstruction: scores windows
- Event reconstruction → Event evaluation: returns intervals
src/evaluation.py - Event evaluation → EEG visualization: reports metrics
- Streamlit demo → Signal and annotation I/O: loads data
app/streamlit_app.py - Streamlit demo → Event reconstruction: uses event intervals
app/streamlit_app.py - Streamlit demo → Event evaluation: uses event metrics
app/streamlit_app.py - Streamlit demo → EEG visualization: renders views
app/streamlit_app.py - Validation checks → Classical models: checks models
scripts/verify_three_checks.py - Validation checks → Deep learning: checks networks
scripts/verify_three_checks.py - Validation checks → Event evaluation: checks evaluation
scripts/verify_three_checks.py - Validation checks → Signal and annotation I/O: loads recordings
scripts/verify_three_checks.py - Validation checks → Event reconstruction: checks reconstruction
scripts/verify_three_checks.py