GithubHelp home page GithubHelp logo

nabilalibou / connectivity_segmentation Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 561 KB

Track and segment the dynamics of brain connectivity networks

License: MIT License

Python 100.00%
connectivity eeg eeg-analysis functional-connectivity kmeans-clustering microstates

connectivity_segmentation's Introduction

Connectivity Microstates Segmentation

Python library to track the spatiotemporal dynamics of brain network based on a modified k-means clustering algorithm [1] adapted to EEG connectivity graphs with a methodology similar to [2] (see Figure 1).

In order to identify the different clusters sequentially involved in the cognitive process, the algorithm aims at identify and segment the connectivity microstates [3][4].


Result of the connectivity spatiotemporal segmentation process applied to adjacency matrix from subjects who performed a picture recognition and naming task. Illustrates the Event related potentials for the picture naming task and the obtained sequential clusters associated to their corresponding brain connectivity networks. Figure taken from [2].

Installation

git clone https://github.com/nabilalibou/connectivity_segmentation.git
pip install -r requirements.txt

How to use

connectivity-segmentation relies on 2 convenient classes:

connectivity_segmentation.kmeans.ModKMeans 
connectivity_segmentation.segmentation.Segmentation

We start by fitting the modified kmeans algorithm to a dataset using the ModKMeans.fit() method before the ModKMeans.predict() method which will return the microstate Segmentation object.
The segmentation can be visualised using the method segmentation.Segmentation.plot().

The package implement other methods and functions to compute, visualise and save various metrics and statistics to evaluate the clustering solution.

Note: The Segmentation class is an adaptation of the _BaseSegmentation class from the library pycrostate [5] (https://github.com/vferat/pycrostates, Copyright (c) 2020, Victor Férat, All rights reserved.)

References

[1] Pascual-Marqui RD, Michel CM, Lehmann D. Segmentation of brain electrical activity into microstates: model estimation and validation. Biomedical Engineering, IEEE Transactions on. 1995; 42:658–665

[2] Mheich, A.; Hassan, M.; Khalil, M.; Berrou, C.; Wendling, F. (2015). A new algorithm for spatiotemporal analysis of brain functional connectivity. Journal of Neuroscience Methods, 242(), 77–81. doi:10.1016/j.jneumeth.2015.01.002

[3] Christoph M. Michel and Thomas Koenig. Eeg microstates as a tool for studying the temporal dynamics of whole-brain neuronal networks: a review. NeuroImage, 180:577–593, 2018. doi:10.1016/j.neuroimage.2017.11.062.

[4] Micah M. Murray; Denis Brunet; Christoph M. Michel (2008). Topographic ERP Analyses: A Step-by-Step Tutorial Review. , 20(4), 249–264. doi:10.1007/s10548-008-0054-5

[5] Victor Férat, Mathieu Scheltienne, rkobler, AJQuinn, & Lou. (2023). vferat/pycrostates: 0.4.1 (0.4.1). Zenodo. https://doi.org/10.5281/zenodo.10176055

connectivity_segmentation's People

Contributors

nabilalibou avatar

Stargazers

 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.