Giter VIP home page Giter VIP logo

stroke-eeg-brain-network-analysis's Introduction

Stroke-EEG-Brain-network-analysis

Functional connectivity and brain network (graph theory) analysis for motor imagery data of stroke patiens.

Installation

  1. Create a conda environment
conda create -n env_name python=3.10
  1. Install pip package
pip install -r requirements.txt
  1. Install seaborn package
pip install seaborn==0.12.0

Dataset

The EEG dataset of stroke patients is provided by Liu et.al in https://doi.org/10.6084/m9.figshare.21679035.v5
You just need to download "sourcedata.zip" through this link and unzip it to the "dataset/sourcedata" directory.

Usage

  1. Python file: figshare_stroke_fc2.py
  • Plot functional connectivity matrix and corresponding topology in 3 frequency bands for 50 stroke patients.
  • Save the functional connectivity data (imcoh_left.npy and imcoh_right.npy) to data_load/ImCoh_data.
python figshare_stroke_fc2.py
  1. Python file: figshare_fc_mst2.py
  • Calculate and visualize the maximum spanning tree (MST) transformed from the function connectivity matrix.
  • Correlation analysis: regplot between the NIHSS score and various MST metrics (diameter, eccentricity, leaf number, tree hierarchy).
  • Comparision analysis: violinplot of the MST metrics under the low NIHSS group and high NIHSS group.
  • Correct the correlation coefficient by Spearman correlation and permutation test.
python figshare_fc_mst2.py

Directory

│  figshare_fc_mst2.py
│  figshare_stroke_fc2.py
│  
├─dataset
│  │  subject.csv
│  │  
│  └─sourcedata
│      ├─sub-01
│      │      sub-01_task-motor-imagery_eeg.mat
│      │      
│      ├─sub-02
│      │      sub-02_task-motor-imagery_eeg.mat
│      │ 
│      │  ...
│      │ 
│      └─sub-50
│              sub-50_task-motor-imagery_eeg.mat
│              
└─data_load
    └─ImCoh_data
        └─alpha_beta12
                imcoh_left.npy
                imcoh_right.npy

stroke-eeg-brain-network-analysis's People

Contributors

lazyjiang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.