How vthuong99/eeg_ad_detection works
Major components
• Data Input & Preprocessing Layer – Represented by the files in src/data_processing. This includes modules for loading the EEG datasets (load_data.py) and processing the raw data (bandpower.py, feature_extraction.py).
• Model Development Layer – Located in src/model. This layer contains several machine learning/deep learning models including CNN_TransSeizNet.py, DICE_Net.py, cnnNet.py, dl_model.py, and additional helper components like layer.py and transformer_model.py.
• Model Evaluation & Validation Layer – Found in src/validation. This includes the cross_validation.py script which implements the LOSO strategy and metrics.py for performance evaluation.
• Experimentation & Analysis – Notebooks in src/notebooks (e.g., experiment.ipynb) for exploratory work, prototyping, or visual analysis of model performance.
• Results Output – The results folder, which stores evaluation outputs (e.g., dl_model_eval.txt and ml_model_eval.txt) that document model performance.
• Project Configuration – Files like config.py and requirements.txt provide configuration settings and dependency management.
Relationships and interactions
• Data flows from the Data Input (EEG dataset) to the Preprocessing modules, which then produce features via feature extraction methods.
• These features feed into the Model Development Layer – where different architectures are defined to train on the preprocessed data.
• After training, the evaluation process is handled by the Validation layer (LOSO cross-validation using cross_validation.py and metrics.py) and the results are recorded in the Results folder.
• The Notebooks act as an orchestration/testing environment that ties these components together for experimentation.
• Configuration files (config.py) guide settings for the pipeline and make it reproducible.
Architectural patterns and design principles
• Modular Pipeline: Each stage (data processing, model building, validation) is clearly separated, making it easy to plug in different modules or update specific stages.
• Reproducibility: The use of configuration files (config.py) and well-documented requirements encourages consistency across experiments.
• Experimentation/Exploratory Analysis: The inclusion of notebooks highlights the iterative nature typical in ML projects.
• Evaluation via LOSO Cross-Validation: A systematic cross-validation strategy is integral for assessing model robustness.
Associate technologies and frameworks
• Python is the primary language, with libraries probably used for numerical computing and ML (e.g., NumPy, SciPy, perhaps PyTorch or TensorFlow, though not explicitly mentioned).
• Data processing techniques specific to EEG signal analysis (band power computation) are essential.
• A clear ML evaluation pipeline using LOSO cross-validation.