This repository demonstrates a workflow for analyzing EEG data using Graph Fourier Transform (GFT). Below are the steps to reproduce the results.
- Download the dataset from OpenNeuro.
- Dataset used: EEG dataset for brain activity analysis.
- Save the dataset in the folder:
data/Data-OpenNeuro.
- Run the preprocessing script to convert raw EEG data into a usable format:
run src/data_preprocessing/load_save_data.m
- This script processes the data and saves the output in the folder:
data/ProcessedMATFiles
- If you wish to corroborate, construct a graph representation of the EEG data using the following script:
run src/graph_construction/graph_construction.m- Pass the .mat file from data/ProcessedMATFiles as the parameter to generate the graph adjacency matrix and Laplacian.
- Extract relevant features from the constructed graph using:
run src/feature_extraction/extract_features.mThis script processes all the files in data/ProcessedMATFiles and generates a feature matrix containing the computed features for all EEG samples.
- It also generates a labels array categorizing each sample into groups such as Alzheimer’s, Frontal Dementia, or Healthy controls.
- Run machine learning classification models using:
run src/model/run_classification.m
This script:
- Splits the data into training and testing sets.
- Evaluates classifiers including k-NN, Random Forest, Logistic Regression, SVM, Naive Bayes, Neural Networks, and more.
- Computes performance metrics such as accuracy, precision, recall, and F1-score for each model.
- Prints the results in the MATLAB console.
- Generate visualizations to interpret the results using the plotting scripts:
run src/Plotting/<script_name>.m- Plots are saved in a designated folder, such as:
results/plotsproject/
├── data/
│ ├── Data-OpenNeuro/ % Raw EEG data
│ ├── ProcessedMATFiles/ % Preprocessed EEG data
├── src/
│ ├── data_preprocessing/ % Scripts for preprocessing
│ ├── graph_construction/ % Scripts for graph construction
│ ├── feature_extraction/ % Scripts for extracting features
│ ├── model/ % Scripts for training classifiers
│ ├── Plotting/ % Scripts for generating plots
├── results/
│ ├── plots/ % Folder to save generated plots
├── README.md % This file
This structured workflow allows for seamless analysis of EEG data using GFT. For any issues, please consult the respective scripts and their comments.