%A von Wegner,Frederic
%A Laufs,Helmut
%D 2018
%J Frontiers in Neuroinformatics
%C
%F
%G English
%K EEG,Microstates,Information Theory and Signal Processing,python language,open source
%Q
%R 10.3389/fninf.2018.00030
%W
%L
%N 30
%M
%P
%7
%8 2018-June-01
%9 Methods
%#
%! Microstate entropy in Python
%*
%<
%T Information-Theoretical Analysis of EEG Microstate Sequences in Python
%U https://www.frontiersin.org/article/10.3389/fninf.2018.00030
%V 12
%0 JOURNAL ARTICLE
%@ 1662-5196
%X We present an open-source Python package to compute information-theoretical quantities for electroencephalographic data. Electroencephalography (EEG) measures the electrical potential generated by the cerebral cortex and the set of spatial patterns projected by the brain's electrical potential on the scalp surface can be clustered into a set of representative maps called EEG microstates. Microstate time series are obtained by competitively fitting the microstate maps back into the EEG data set, i.e. by substituting the EEG data at a given time with the label of the microstate that has the highest similarity with the actual EEG topography. As microstate sequences consist of non-metric random variables, e.g. the letters A-D, we recently introduced information-theoretical measures to quantify these time series. In wakeful resting state EEG recordings, we found new characteristics of microstate sequences such as periodicites related to EEG frequency bands. The algorithms used are here provided as an open-source package and their use is explained in a tutorial style. The package is self-contained and the programming style is procedural, focusing on code intelligibility and easy portability. Using a sample EEG file, we demonstrate how to perform EEG microstate segmentation using the modified K-means approach, and how to compute and visualize the recently introduced information-theoretical tests and quantities. The time-lagged mutual information function is derived as a discrete symbolic alternative to the autocorrelation function for metric time series and confidence intervals are computed from Markov chain surrogate data. The software package provides an open-source extension to the existing implementations of the microstate transform and is specifically designed to analyze resting state EEG recordings.