How alegomezri/eeg-tact works
EEG-TACT is a research workflow for classifying children’s resting-state EEG recordings as ADHD or control. The principal path prepares subject recordings into overlapping epochs, evaluates a Keras EEGFormer with subject-grouped folds and per-fold hyperparameter selection, then produces trial/subject predictions and aggregate metrics. The repository also documents baseline comparisons, ablations, multi-seed experiments, and statistical analyses. The README and sampled files support the workflow at a high level; several notebook-driven and Keras data/model internals are not shown, so those links are documented rather than inferred from unsampled code.
Main entry points: objective.py Hyperparameter tuning · evaluate_eegformer.py EEGFormer evaluation · rebuild_eegformer_5fold_all_trial_probs.py Trial probability rebuild · experiments Experiment runs
Components 20
EEG preparation
- Signal preprocessing
src/data/preprocessing.py - Dataset builder
src/data/build_dataset.py - Epoch dataset
src/data/dataset.py
Models and training
- EEG-TACT model
src/models/keras/eegformer.py - Baseline models
src/models/keras - EEGConformer
src/models/torch/eegconformer.py - Training and metrics
src/training/trainer.py - Seed control
src/utils/seed.py
Evaluation workflow
- Hyperparameter tuning
src/tuning/objective.py - EEGFormer evaluation
scripts/evaluate_eegformer.py - Trial probability rebuild
scripts/rebuild_eegformer_5fold_all_trial_probs.py - Trial predictions
results/eegformer_5fold_run/trial_predictions_5fold.csv - Evaluation outputs
results/evaluation
Research analysis
- Experiment runs
experiments - Multi-seed results
results/many_seed_experiments - Ablation results
results/ablation - Statistical tests
statistical_tests/proportion_tests.py - Embedding exploration
notebooks/tsne_projection.ipynb
Other components
- Researcher
- EEG recordings
Connections 26
- Researcher → Dataset builder: prepares data
README.md - EEG recordings → Dataset builder: loads recordings
src/data/build_dataset.py - Dataset builder → Signal preprocessing: filters and epochs
src/data/build_dataset.py - Dataset builder → Epoch dataset: builds samples
- Researcher → EEGFormer evaluation: runs evaluation
README.md - EEGFormer evaluation → Epoch dataset: loads epochs
- EEGFormer evaluation → EEG-TACT model: evaluates folds
scripts/evaluate_eegformer.py - EEGFormer evaluation → Trial predictions: reads split data
scripts/evaluate_eegformer.py - EEGFormer evaluation → Evaluation outputs: writes metrics
scripts/evaluate_eegformer.py - Researcher → Hyperparameter tuning: selects parameters
README.md - Hyperparameter tuning → Epoch dataset: creates fold datasets
src/tuning/objective.py - Hyperparameter tuning → EEGConformer: constructs model
src/tuning/objective.py - Hyperparameter tuning → Training and metrics: trains and evaluates
src/tuning/objective.py - Hyperparameter tuning → Seed control: sets seed
src/tuning/objective.py - Researcher → Trial probability rebuild: rebuilds probabilities
README.md - Trial probability rebuild → EEG-TACT model: builds fold model
scripts/rebuild_eegformer_5fold_all_trial_probs.py - Trial probability rebuild → Trial predictions: reads fold assignments
scripts/rebuild_eegformer_5fold_all_trial_probs.py - Trial probability rebuild → Evaluation outputs: writes probabilities
scripts/rebuild_eegformer_5fold_all_trial_probs.py - Researcher → Experiment runs: runs comparisons
README.md - Experiment runs → Baseline models: compares models
- Experiment runs → Ablation results: tests components
README.md - Experiment runs → Multi-seed results: records seed runs
README.md - Researcher → Statistical tests: analyzes results
README.md - Statistical tests → Multi-seed results: tests model differences
- Researcher → Embedding exploration: explores embeddings
README.md - Embedding exploration → Evaluation outputs: uses saved embeddings