Brainpipe

Brainpipe is a python toolbox dedicated to the analysis and classification of neuro-physiological signals. Brainpipe allows for the extraction of a wide range of features from brain signals and the application of a wide range of machine learning algorithms based on the scikit-learn library. For now the available processing and feature extraction functionlities are tailored to EEG, MEG, intracranial EEG (SEEG & ECoG) signals. Brainpipe can be used for single and multi-feature classification and provides a flexible and easiliy extendable tool for neuroscience data mining.

Brainpipe can also perform parallel computing and try to optimize RAM usage for our ‘large’ datasets. If you want to have a quick overview of what you can actually do, checkout the References.

It’s evolving every day! So if you have problems, bugs or if you want to collaborate and add your own tools, contact me at e.combrisson@gmail.com

Brainpipe is a package primarily written by Etienne Combrisson, as part of his PhD research work, suprvised by Prof Karim Jerbi (CoCo Lab, Psychology Department, University of Montreal, QC, Canada) and Prof Aymeric Guillot (University Claude Bernard Lyon 1, Inter-University Laboratory of Human Movement Biology, Lyon, France)

_images/bplogo.png

Requirements

brainpipe is developed on Python 3 but should be compatible with Python 2.

Please, check if you have this toolbox installed and already up-to-date:

  • matplotlib (visualization)
  • scikit-learn (machine learning)
  • joblib (parallel computing)
  • scipy
  • numpy
  • psutil

Installation

Ru the following commands :

git clone git@github.com:EtienneCmb/brainpipe.git

Then, go to the brainpipe cloned folder and run :

python setup.py install

What’s new

v0.1.8

  • Fix LeavePSubjectOut permutations for unique labels.
  • Fix classification plot colors.

v0.1.6

  • Fix scikit-learn v0.18 compatibility
  • Add mutli-features pipelines

v0.1.5

  • classify: fit_stat() has been removed, there is only fit() now. confusion_matrix() has been rename to cm()
  • LeavePSubjectOut: new leave p-subjects out cross validation
  • classification: embedded visualization (daplot, cmplot), statistics (classify.stat.), dataframe for quick settings summarize (classify.info.) with excel exportation
  • New folder: ipython notebook examples
  • tools: unique ordered function

v0.1.4

  • PAC: new surrogates method (shuffle amplitude time-series) + phase synchro
  • New features (phase-locked power (coupling), ERPAC (coupling), pfdphase (coupling), Phase-Locking Value (coupling), Phase-locking Factor (PLF in spectral) and PSD based features)
  • New tools for physiological bands definition
  • New plotting function (addPval, continuouscol)
  • Start to make the python adaptation of circstat Matlab toolbox
  • Add contour to plot2D() and some other parameters
  • New doc ! Checkout the References
  • Bug fix: pac phase shuffling method, coupling time vector, statictical evaluation of permutations

v0.1.0

  • Statistics:
    • Permutations: array optimized permutation module
    • p-values on permutations can be compute on 1 tail (upper and lower part) or two tails
    • metric:
    • Multiple comparison: maximum statistique, Bonferroni, FDR
  • Features:
    • sigfilt//amplitude//power//TF: wilcoxon/Kruskal-Wallis/permutations stat test (comparison with baseline)
    • PAC: new Normalized Direct PAC method (Ozkurt, 2012)
  • Visualization:
    • tilerplot() with plot1D() and plot2D() with automatic control of subplot
  • Tools:
    • Array: ndsplit and ndjoin method which doesn’t depend on odd/even size (but return list)
    • squarefreq() generate a square frequency vector