Degree Project in Computer Science and Engineering, First cycle, 15 credits
Code developed by Tenzin Sangpo Choedon, Spring 2025
Exploring brain connectivity is essential to gain a deeper understanding of epileptic seizure dynamics. Particularly, effective connectivity is used for detecting causal relationships between neural regions, with Granger Causality (GC) being a widely recognized measurement. However, identifying the specific EEG channels that are causally involved in epilepsy remains a challenge. Convergent Cross Mapping (CCM) has been developed to address these limitations of GC. Despite the potential of CCM, there have been minimal real applications in epilepsy. Additionally, previous research suggests that there is a stronger directional causal influence on certain brain regions during seizures. Therefore, this study explores causal asymmetries across channels in epilepsy by applying CCM to EEG data. The methodology of this study involves preprocessing the data from the CHB-MIT dataset, passing it into the CCM algorithm, tuning the CCM parameters, and evaluating the resulting causality across non-seizure, preictal and ictal states through asymmetry measures. The results indicate that causality patterns are generally more asymmetric during pre-seizure and seizure activity compared to non-seizure activity. Furthermore, results from individual channels suggest that channels 20 and 21, as well as channels 6 and 12 most consistently exhibit the highest asymmetry in causality for pre-seizure and seizure activity, respectively, which is partially consistent with previous findings. It is concluded that CCM can be applied, with the improvements of scalable methods, to identify potential EEG channels that are important for underlying directional connectivity involved in seizure dynamics.
root/
βββ src/ # Python scripts for preprocessing, computing and evaluating ccm scores
βββ docs/ # Documentations such as the thesis report and select few generated illustrations
βββ data/ # CHB-MIT dataset is loaded and stored here
βββ README.md
βββ .gitignore
Python 3.7+
- Required Python packages (install via pip):
pip install numpy scipy pandas matplotlib pyEDM
CCM
- Download Python juypiter version from here
CHB-MIT
- Download dataset from here and store it in root/data folder
Run the scripts in this order:
- Preprocess data
python src/preprocess_data.py
- Compute CCM on subjects
python src/process_CCM_subjects.py
- Evaluate CCM results of all subjects
python src/eval_CCM_subjects.py