home

EEG Microstate Sequences: A Visual Exploration of State Distributions

Introduction

This report delves into the statistical distributions and visualizations of EEG microstate sequences, comparing healthy and schizophrenia subjects. Employing a range of analytical and plotting techniques, including bar plots, violin plots, and heatmaps, we aim to uncover patterns and differences in the state distributions between the groups.

EEG microstate sequences offer a window into the brief periods where the brain's electrical activity is quasi-stable. Understanding the distributions of these states can provide insights into normal and pathological brain functions. This report is a extension of the work presented in → Correlation Matrices of EEG Microstate Sequences in Healthy and Schizophrenic Individuals, which explores the differences in EEG microstate sequences between healthy and schizophrenia subjects. We build upon this work by performing a visual analysis of the state distributions, offering a more granular look at the differences between the groups.

Data Preparation

We begin by loading the EEG microstate sequences for both healthy and schizophrenia subjects. We will focus on the microstate_sequences column, which contains the sequences for each subject. No further data preparation is required, as the sequences are already in the correct format for analysis. Note that in this report we do not use TPMs, as we are only interested in the state distributions - so there is no distinction for state transitions, probabilities, or self-transitions.


Histogram Visualization of State Frequencies in Individuals

In this section, we present a series of histograms to visualize the distribution of EEG microstate sequences for individuals. The histograms provide a clear, quantitative view of how frequently each state occurs within each individual's sequence. This approach aims to uncover any characteristic patterns or notable deviations in state occurrences among the both groups.

For each individual in the both groups, we construct a histogram that represents the frequency of each state occurring within their EEG sequences. The collection of histograms provides a panoramic view of state distributions across the group, facilitating a comparison between individuals and against typical patterns that are observed.

State Distribution Visualization: Individual state distributions are visualized using bar plots for a granular look at each subject's state frequencies.

Bars Schizo

Fig. 1: State distributions for healthy subjects.

Bars Schizo

Fig. 2: State distributions for schizophrenia subjects.

Data Transformation and Structure

Visualizing the Frequency of EEG States in Healthy Individuals Using Sorted Bar Graphs

This section of the report presents a series of bar graphs, each representing the frequency of EEG states in individual sequences from subjects. By organizing and visualizing the data in this manner, we aim to provide a clear and comparative understanding of the prevalence and distribution of various states within each individual's sequence.

State Frequency Visualization: The frequency of each state is visualized using a bar graph, providing a clear, quantitative representation of the distribution of states.

Bars Healthy

Fig. 3: State frequency for healthy subjects.

Bars Schizo

Fig. 4: State frequency for schizophrenia subjects.

Data Transformation and Structure
Interpretation

These sorted bar graphs provide a detailed and comparative view of the frequency distribution of EEG states for each subject in the both groups. By examining the height and color of the bars, we can infer the prevalence and variety of states within individual sequences. The arrangement and sorting make it easier to identify common patterns or unique characteristics within the healthy population, facilitating further analysis or comparison with other groups such as individuals with schizophrenia.


Violin Plots for Group Comparison

In this section, we explore the distribution of microstate counts within the EEG sequences of individuals using violin plots. The aim is to provide a visual representation that captures the distribution and density of each state's occurrences across all subjects in the both groups. This visualization helps in identifying the commonality and variability of state occurrences within the group.

Violin Plots for Group Comparison: Group-wide distributions are explored using violin plots, showcasing the spread and density of state occurrences.

Violin Healthy

Fig. 5: Violin plots for healthy subjects.

Violin Schizo

Fig. 6: Violin plots for schizophrenia subjects.

Data Transformation and Structure

Data Preparation: For each sequence in the both groups, we identify the unique states and count their occurrences within the sequence. This results in a distribution of counts for each state across all sequences.

Violin Plot Construction:

Plot Description

The resulting violin plot offers a comprehensive view of how each state is distributed across the individual sequences, highlighting the variability and density of each state's occurrence. This visual analysis is crucial for understanding the typical EEG microstate patterns in individuals and can serve as a reference when comparing between the groups.


Violin Plot Analysis of Brain State Distributions by Subject

This section of the report delves into an expansive visual analysis of the distribution of brain states for each subject, categorized by group (Schizophrenia vs. Healthy), using violin plots. This visualization aims to offer a detailed and comparative perspective on how individual subjects EEG microstate sequences distribute across different brain states, potentially reflecting underlying patterns or deviations associated with each group.

expanded_violin

Fig. 7: Violin plots for brain state distributions by subject.

Visualization Strategy
Plot Description
Interpretation

By examining the shape, spread, and orientation of the violins across all subjects and states, we can infer individual and group-level patterns in the distribution of brain states. This visualization helps identify unique or common distribution patterns that might correlate with group characteristics, offering insights into the neurological or behavioral dimensions of schizophrenia and healthy controls.

The same plot in vertical orientation is shown below for a different perspective.

expanded_subjects_violin_v

Fig. 8: Violin plots for brain state distributions by subject (vertical orientation).

Box plot for comparison:

expanded_boxplot

Fig. 9: Box plot for brain state distributions by subject.

This plots shows the same data as the violin plots, but in a different format. The box plot is a standard visualization for showing the distribution of data, with the box representing the quartiles and the whiskers showing the extent of the data. The violin plot is a more detailed version of the box plot, showing the distribution of data as a kernel density plot, with the width of the plot indicating the frequency of the data. The violin plot also shows the quartiles, giving a sense of the central tendency and spread of the data.


Heatmap Visualization of State Occurrences in Individuals

This section of the report presents a heatmap visualization to represent the frequency of each brain state across all subjects in the both groups. Heatmaps provide an intuitive color-coded representation of the data, making it easier to spot patterns, frequencies, and anomalies in the distribution of states.

Heatmap Visualization: The frequency of each state is visualized using a heatmap, providing a clear, color-coded representation of the distribution of states.

heatmap_healthy

Fig. 10: Heatmap for healthy subjects.

heatmap_schizo

Fig. 11: Heatmap for schizophrenia subjects.

Data Transformation and Structure
Visualization Description
Interpretation

The heatmap allows for an immediate visual assessment of state frequency distribution across subjects in the both groups. Here we can identify common patterns, high-frequency states, or anomalies by examining the color gradients across the matrix.


Structured Data Compilation and Descriptive Analysis of EEG Microstate Sequences

This section highlights the methodical approach to organizing EEG microstate sequences into a structured data format, facilitating a comprehensive descriptive statistical analysis. By systematically categorizing the sequences into states, groups, and subjects, we establish a robust framework for in-depth analysis and visualization.

Data Organization Methodology
Descriptive Analysis
State ('Group', 'count') ('Group', 'unique') ('Group', 'top') ('Group', 'freq') ('Subject', 'count') ('Subject', 'unique') ('Subject', 'top') ('Subject', 'freq')
1 41905 2 Healthy 27622 41905 84 Subject 9 2734
2 46596 2 Schizo 24169 46596 84 Subject 60 1195
3 41939 2 Healthy 23027 41939 84 Subject 10 1670
4 37477 2 Schizo 18752 37477 84 Subject 63 1465
5 38151 2 Schizo 19573 38151 84 Subject 1 997
6 49384 2 Schizo 30133 49384 84 Subject 7 2678
7 38670 2 Schizo 22664 38670 84 Subject 80 1287
8 43211 2 Schizo 24534 43211 84 Subject 34 1657
9 31971 2 Schizo 17565 31971 84 Subject 21 1485
10 39383 2 Schizo 20286 39383 84 Subject 36 1271
11 43884 2 Schizo 25239 43884 84 Subject 76 1519
12 43272 2 Schizo 24617 43272 84 Subject 33 1386
13 39846 2 Schizo 21328 39846 84 Subject 5 1337
14 36546 2 Schizo 20332 36546 84 Subject 81 829
15 39205 2 Schizo 23441 39205 84 Subject 50 1569
16 33680 2 Schizo 19772 33680 84 Subject 45 772
Interpretation

The structured organization of the EEG microstate sequence data into a DataFrame allows for a detailed and nuanced understanding of the distribution of states across subjects and groups. The descriptive statistics offer a preliminary insight into the data's characteristics, such as the prevalence of certain states in one group versus another or the variability of state occurrences across subjects. This foundational analysis sets the stage for more advanced statistical tests and visualizations, providing a basis for further research and discovery.

Conclusion

This report provides a detailed exploration of EEG microstate sequence distributions, revealing distinctive patterns and differences between healthy individuals and those with schizophrenia. Employing a range of analytical and plotting techniques, including bar plots, violin plots, and heatmaps, we uncover patterns and differences in the state distributions between the groups. I hope that this report provides a more granular look at the differences between the groups, offering a deeper understanding of the state distributions and their implications for normal and pathological brain functions.


Author: Łukasz Furman