Figures
Abstract
Background and purpose
Stroke can lead to significant after-effects, including motor function impairments, language impairments (aphasia), disorders of consciousness (DoC), and cognitive deficits. Computer-aided analysis of EEG connectivity matrices and microstates from bedside EEG monitoring can replace traditional clinical observation methods, offering an automatic approach to monitoring the progression of these after-effects. This EEG-based method also enables quicker and more efficient assessments for medical practitioners.
Methods
In this study, we employed Functional Connectivity features that extract spatial representation and Microstate features that focus on the time domain representation to monitor the after-effects of ischemic stroke patients. As the dataset from stroke patients is heavily imbalanced across various clinical after-effects conditions, we designed an ensemble classifier, RSBagging, to address the issue of classifiers often favoring the majority classes in the classification of imbalanced datasets.
Results
The experimental results demonstrate that different connectivity matrices are effective for three classification tasks: consciousness level, motor disturbance, and stroke location. Using our RSBagging model, all three tasks achieve over 98% accuracy, sensitivity, specificity, and F1-score, significantly outperforming the existing classifiers SVM, XGBoost, and Random Forest.
Citation: Wang F, Zhang X, Zhang P, Hu F (2024) RSBagging: An ensemble classifier detecting the after-effects of ischemic stroke through EEG connectivity and microstates. PLoS ONE 19(10): e0311558. https://doi.org/10.1371/journal.pone.0311558
Editor: Ramu Anandakrishnan, Edward Via College of Osteopathic Medicine, UNITED STATES OF AMERICA
Received: June 27, 2024; Accepted: September 21, 2024; Published: October 22, 2024
Copyright: © 2024 Wang et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: The data, along with the extracted features and labels, can be found at https://github.com/linda-edward/RSBagging.
Funding: The author(s) received no specific funding for this work.
Competing interests: The authors have declared that no competing interests exist.
Introduction
Stroke is a prevalent neurological disorder worldwide, constituting a leading cause of severe disability. It often results in significant after-effects, such as extensive motor function impairment [1, 2], disorder of consciousness (DoC) [3], aphasia and cognitive dysfunction [4]. These disabilities seriously affect patients’ quality of life. Resting-state electroencephalography (EEG) monitoring is an effective way to assist medical practitioners in rapidly assessing after-effects of stroke. Studies have found that EEG indices of sub-acute ischemic stroke are correlated with traditional clinical scores, such as the NIHSS, and may inform future management of stroke patients [5]. The investigation of the correlation between early EEG biomarkers and functional and morphological outcomes in thrombolysis-treated strokes helps better establish the treatment strategies [6, 7]. A recent EEG fractal analysis indicates that stroke patients have significantly less complex brain activity compared to healthy individuals during the acute and early subacute stages [8].
Brain functional connectivity and EEG microstates have demonstrated associations with specific phenotypes. Brain functional connectivity, which refers to the correlation patterns between different brain regions, has been linked to various psychiatric, behavioral, and cognitive characteristics [9, 10]. Several connectivity matrices have been developed, focusing on the amplitude and phase of oscillatory activity across different frequency bands, and have been correlated with diverse phenotypes. For instance, the phase-locking value (PLV) has been instrumental in emotion recognition [11] and in differentiating schizophrenia [12]; the weighted phase lag index (wPLI) distinguishes wakefulness from sleep [13]; whereas the Pearson correlation coefficient (PCC) and coherence (COH) detect Disorders of Consciousness (DoC) in brain injuries [14]. EEG microstates, which are brief semi-stable periods in global electrical brain activity captured by EEG scalp recordings, have also been associated with specific phenotypes. Microstate analysis segments EEG data into a limited number of clusters, each lasting 40-150 ms, based on global scalp points [15]. These transient periods of stability manifest as distinct topographical representations known as microstates. Numerous studies explore how EEG microstate properties vary across cognitive tasks, genders, medications, and diseases. For example, a study in NeuroImage examined how the spatial and temporal properties of microstates might be altered by manipulating cognitive tasks (a serial subtraction task versus wakeful rest) [16]. Changes in EEG microstates have also been explored in patients with head injury [17], narcolepsy [18], Alzheimer’s disease [19] and stroke [1].
Recent years have seen a surge in published articles utilizing machine learning techniques, leveraging various features and biomarkers extracted from signal processing and brain connectivity analysis. Two prevalent methods for constructing these models are: (a) Ensembles of decision trees (e.g., random forests and gradient boosting machines) for structured data, and (b) Multilayered neural networks trained with Stochastic Gradient Descent (i.e., shallow and/or deep learning) for unstructured data [20]. Given the structured nature of the EEG data in this study, involving connectivity matrices and EEG microstates, an ensemble classifier is deemed more suitable than multilayered neural networks. Additionally, ensemble classifiers offer advantages such as interpretability, faster training, independence from specialized GPU hardware for large-scale inference, and reduced hyperparameter tuning compared to deep learning methods. Notably, prominent ensemble classifiers include Adaboost [21], Xgboost [22], and Random Forest, all constructed by aggregating decision trees through bagging or boosting techniques.
Despite the superior accuracy of these boosting classifiers on balanced datasets, our experiments reveal their limitations in effectively detecting typical phenotypes within real clinical datasets, often characterized by imbalanced class distributions. For instance, in this study, disorders of consciousness and motor disturbances are challenging to detect due to their imbalanced representation. Even with resampling techniques like random under-sampling or over-sampling, the enhancements achieved by existing ensemble classifiers remain modest. Addressing imbalanced datasets, skewed toward one or more classes, poses a significant challenge for classifiers.
To mitigate the drawbacks of existing boosting methods, this paper introduces a novel ensemble classifier called Bagging of Support Vector Machines with Random Under-Sampling (RSBagging). Our RSBagging model utilizes resampling techniques to tackle classifier bias towards the majority class and injects diversity into each base classifier through random under-sampling with replacement. Initially, the original imbalanced dataset is divided into training and testing sets. Subsequently, the training set is further subdivided into multiple balanced training subsets using random under-sampling. Each independent base classifier SVM is trained on an imbalanced training subset and provides predictions for the same test set. Finally, majority voting is employed to aggregate the predictions from the multiple base SVM models.
The remainder of this paper is structured as follows: we begin with the materials and feature extraction section, followed by an exposition on the RSBagging ensemble classifier model. Subsequently, we present the classification results and discussions pertaining to three classification tasks. Finally, the Conclusion section provides a summary and closing remarks.
Materials and feature extraction
Participants and clinical assessment
Table 1 summarized the demographics and clinical characteristics of the participants. There were 241 stroke patients (mean age = 66.23 years, standard deviation (SD) = 13.17 years) in this study. These subjects were patients admitted to the neurology department at Shanxi Provincial People’s Hospital after acute stroke. Inclusion criteria were as follows: (1) The patients were diagnosed with ischemic stroke, (2) EEG data were recorded and available for analysis, and (3) the corresponding assessment of consciousness by medical practitioners was recorded. Exclusion criteria were: (1) patients younger than 18 years old, and (2) pregnant patients.
In our study, the state of consciousness, stroke location (from MRI), and motor disturbances (from clinical assessments) were recorded for all participants, as summarized in Table 1. Neurological examinations assessing consciousness and motor disturbances were conducted immediately before EEG signal recordings. Stroke locations were identified via MRI, and motor disturbances were diagnosed by clinicians. All clinical assessments were performed by medical practitioners blinded to the EEG measures.
All data were collected as part of a retrospective study of medical records, approved by the local institutional review board of Shanxi Provincial People’s Hospital and the ethics committee waived the need for consent. The data were accessed for research purposes from January 16, 2024, to January 15, 2025. The authors had no access to information that could identify individual participants during or after data collection. All methods in this study were carried out in accordance with relevant guidelines and regulations.
EEG data acquisition and pre-processing
EEG data were gathered using a bedside digital video EEG monitoring system (Solar 2000 N, Solar Electronic Technologies Co., Ltd, Beijing, China) at a sampling rate of 500 Hz. In line with the International Federation of Societies for Electroencephalography and Clinical Neurophysiology recommendations, we adhered to the international 10-20 system for electrode placement. This involved positioning 20 Ag/AgCl electrodes, as depicted in Fig 1.
EEG preprocessing was performed using MATLAB (MathWorks, Natick, MA) and the EEGLAB (version 14.1.1b) and Fieldtrip toolboxes. For analysis, we selected ten minutes of EEG data from each participant. The preprocessing steps included:
- (a) Identifying and interpolating faulty EEG channels based on neighboring channel statistics.
- (b) Re-referencing all channel signals to an average reference.
- (c) Applying high-pass filtering at 0.5 Hz and low-pass filtering at 45 Hz using a finite impulse response (FIR) filter.
- (d) Using the automatic continuous rejection tool in EEGLAB to detect and eliminate artifacts.
Brain connectivity feature extraction
Brain connectivity can be categorized into three types: structural, functional, and effective connectivity [23]. Structural connectivity refers to the physical connections between neurons, such as the axonal connections between one neural mass and another which is outside the scope of this study. Here, we focus on functional and effective connectivity. Functional connectivity measures the correlation between different regions of the brain, while effective connectivity measures the causal relationships between regions, i.e. how changes in one region lead to changes in another [24].
The coordination of information flow between brain regions is essential for performing various cognitive and perceptual tasks. The brain can adjust the flow of information by altering the strength, pattern, or frequency of oscillatory synchrony between different brain areas [25]. To describe the relationship between brain regions, researchers use various connectivity matrices, however, each connectivity matrices has advantages and disadvantages, and its vigorous adherents and opponents [23]. As a result, it is often difficult to know which connectivity matrice is effective for specific tasks.
This study considers 11 connectivity matrices from stroke patients’ EEG signals to explore the most effective ones for the task of detecting DoC, motor disturbance and stroke location side of the brain in stroke patients, respectively. The connectivity matrices are calculated in MATLAB using the FieldTrip Toolbox. The measures conclude connectivity matrices of synchronization and multivariate spectral decomposition. These matrices are computed from frequency from 1Hz to 45Hz and then averaged before input into classifiers. Each connectivity matrix has a shape of 190. Fig 2 shows the flowchart of calculation of the 11 connectivity matrices extracted in this study.
Nonparametric methods.
Nonparametric methods includes linear methods and nonlinear methods.
One widely used linear metric is the COH [26]. It is a normalized linear measure of correlations between two time series signals within a certain frequency band which is sensitive to changes in power and also changes in phase relationships [27]. The COH is defined as:
(1)
where
is the cross power spectral density of two EEG channels x1(t) and x2(t), using Welch’s averaged, modified periodogram method of spectral estimation;
and
are the individual power spectral densities of x1(t) and x2(t), respectively.
The following metrics are nonlinear methods.
The PLV estimates how the relative phase is distributed over the unit circle [12, 27]. PLV, taking the absolute average of phase differences over temporal windows, can be computed as below:
(2)
where Δϕ represents the phase difference of a pair of electrodes, x1(t) and x2(t) (here, Δϕ is calculated in the same way as our previous study [28]); i represents the imaginary unit; tk represents the kth discrete time-step.
The weighted PLI (wPLI) and debiased weighted PLI (wPLI_de) are adjustments to the PLI. The phase lag index (PLI) is a metric that values the distribution of phase differences across observations [29]. It is computed by averaging the sign of the per observation estimated phase difference [25]. The wPLI and wPLI_de are more robust against field spread, noise and sample-size bias than PLI.
The pairwise phase consistency (PPC) and weighted pairwise phase consistency (wPPC) are computed from a data matrice containing a cross-spectral density. PPC is equivalent to the population statistic of the squared PLV [30]. The weighting of the wPPC is according to the magnitude of the cross-spectrum.
The above five metrics provide information about phase synchronization, focusing on the phase coupling of oscillatory systems.
The cross-spectral density (CSD) analyzes the relationship between two signals in the frequency domain [31]. It determines whether the peaks at the same frequency in both time series are statistically significant and if their periodicities are related to each other [31]. This method can be used to identify the frequency response of complex systems, even in the presence of noise and artifacts.
The power correlation (POWCORR) is the correlation between two orthogonalized signals in frequency (co-variation frequency). The method starts by applying spectral analysis to the power envelopes of the signals, using a wavelet-based approach. The coherency between the power envelopes is then calculated, and the real part of this coherency is used as a measure of frequency-specific correlation [32].
Parametric methods.
Compared to nonparametric methods, parametric methods are more widely accepted for estimating the effective connectivity of multi-channel EEGs. Granger causality (GC) [23] provides two estimates of directed connectivity between a given signal pair, measuring separately the influence of signal x on signal y and the influence of signal y on signal x. GC can be applied in both the time and frequency domains. In this study, only the frequency domain is considered. The computation GC in the frequency domain requires the estimation of the spectral transfer matrice H(ω), and the cross-spectral density matrice S(ω) for signal pair (x, y) at frequency ω. It is obtained from:
(3)
where S(ω) = H(ω)∑H(ω)*.
The multivariate approach yields a spectral transfer matrice that can be used to compute a set of connectivity metrics, which are related to Granger causality: the directed transfer function (DTF) and partial directed coherence (PDC). These quantities are normalized between 0 and 1. The normalization factor is defined as the sum along the rows of the spectral transfer matrice for DTF and as the sum along the columns of the inverse of the spectral transfer matrice for PDC. PDC is computationally more efficient and more robust than DTF since it does not involve any matrix inversion [23].
Microstate feature extraction
As functional connectivity matrices mainly extract spatial representation, the subsequent microstate analysis focuses on the representation in the time domain. This analysis employs clustering methods on the time domain of EEG signals to extract features within the temporal domain.
The procedure for microstate analysis follows the methodology detailed in our previous study [33]. The primary steps for microstate feature extraction include microstate segmentation and the calculation of statistical microstate parameters. The detailed steps are as follows:
Microstate segmentation.
This section details the derivation of microstate prototypes from the combined dataset. Initially, the global field power (GFP), representing the spatial standard deviation of EEG signals across all channels, was calculated. Subsequently, a clustering method grouped the GFP sequences into a few classes based on topographic similarity. We employed a modified k-means method in this study, where each resulting cluster represented a topographical prototype, known as a microstate prototype. The modified k-means method incorporates additional features into the clustering process [33, 34].
Theoretically, the number of clusters in the microstates segmentation can be any number. In previous studies, the number of four clusters is the most commonly explored method. Many studies focus on the analysis of the correlations between some phenotypes with the four common microstate prototypes (A, B, C and D). This study focuses on extracting statistical parameters from microstates and using them as features to input classifiers to classify different phenotypes. Therefore, the cluster number in this study is not limited to four.
We set the number of clusters from 2 to 30 in our experiments and Fig 3A shows the micro prototypes of cluster numbers from 2 to 16. Fig 3B and 3C reveals the segmentation of EEG signal based on GFP for four number of cluster and 10 number of cluster, respectively.
An ensemble model: RSBagging
To detect post-stroke conditions, extracting meaningful information from EEG signals and identifying effective biomarkers for various conditions are promising approaches. These can then be used with machine learning for patient classification. However, post-stroke conditions often represent a minority class, making them difficult to identify with standard classifiers like XGBoost and Random Forest. To overcome this challenge, we developed an ensemble classifier using a combination of bagging and random undersampling, referred to as RSBagging.
Framework of RSBagging
Fig 4 illustrates the procedure and framework of our RSBagging method, which operates as follows: First, the original dataset is divided into a training set and a test set. The training set is then randomly undersampled into N subsets. Each of these N subsets is used to train an individual SVM classifier. Each SVM model makes its own classification decisions on the same test dataset. Finally, the classification results from the N SVM models are combined using majority voting to produce the final classification decision.
In comparison to recent ensemble models like XGBoost and Random Forest, our RSBagging model introduces diversity through the random resampling of the training dataset. Diversity is essential for creating accurate ensembles, and each basic model in RSBagging is trained on a different subset of the full training set.
The RSBagging classifier addresses the classification of imbalanced datasets in two main steps: data splitting and resampling, model training and fusion. These steps are detailed below:
Data splitting and resampling
To train and evaluate the RSBagging classifier, the original dataset Doriginal is divided into a test set Dtest and a training set Dtrain using stratified sampling. This method maintains the class ratio in the test set to match that of the original dataset, allowing the classifier to be evaluated on an imbalanced dataset similar to what is encountered in real-world clinical situations.
In the training phase, the training set is further divided into N subsets for the N basic models in the RSBagging classifier. Random undersampling is used to add diversity to the RSBagging ensemble classifier by creating different training subsets for each model. The test set is then input to all trained basic models in the test phase.
The process of splitting the training data can be formalized as follows: Given an imbalanced training dataset Dtrain with m samples (|Dtrain| = m), where each sample is an instance-label pair (xi, yi) with xi in the n-dimensional feature space X = f1, f2, …, fn and yi ∈ Y = 1, 2 as its class label. The sets and
represent the minority and majority class samples in Dtrain, respectively, and
and
.
For each of the N basic classifiers, a subset Subsetn is generated and labeled, where n = 1, ⋯, N. The subsets and
in each Subsetn represent the minority and majority samples, respectively.
To generate Subsetn, is used as
in each of the N subsets. Then, we construct its majority class sample set
of the same size as
by randomly sampling
, i.e.,
and
. Finally, Subsetn is created by combining
and
, resulting in
, n = 1, ⋯, N. Each Subsetn is input to a basic classifier in the RSBagging ensemble.
The data splitting process is illustrated in Fig 5.
Model training and fusion
In our RSBagging ensemble classifier, we selected SVM as the base model. Each SVM model is trained on a distinct training subset, using a Gaussian kernel function. During training, each SVM optimizes the classification function by maximizing the margin between the training samples and the class boundary. The hyperparameters are tuned by maximizing this margin.
The final step in the RSBagging model involves merging the outputs from the individual base models to generate the overall result. This fusion process can be executed at various stages, such as during input feature processing, the training phase, or at the results level. In our RSBagging model, fusion is performed at the final stage. We employ majority voting to combine the results from all SVM models. Given that hard voting does not yield optimal classification performance for our study, we use soft voting with a threshold α. This threshold is an adjustable parameter in RSBagging, tailored to specific classification tasks and datasets, with values ranging from 0.5 to 1.
Parameters
There are two parameters that shall be adjusted in the RSBagging model according to the distribution of a dataset. The first one is the number of basic SVM models in the RSBagging, N. Normally, the more heavily imbalanced the dataset is, the bigger the parameter N shall be used in the EOSVM classifier. The second parameter in the RSBagging model is the threshold value in the result fusion, α, which also reveals the level of confidence in the result fusion. Our experiments show different classification results when α is set with different levels.
Evaluation metrics
We utilize five metrics to assess the classification performance of RSBagging: accuracy, sensitivity, specificity, F1-score, and Predict Rate. The first four metrics are standard measures in machine learning for evaluating classification results. In our evaluation, we designate the minority class in the dataset as positive cases and the majority class as negative cases.
Let TP, TN, FP, and FN represent true positives, true negatives, false positives, and false negatives, respectively. The metrics of accuracy, sensitivity, specificity, and F1-score are mathematically defined as follows:
(4)
(5)
(6)
(7)
The final metric employed in this study is Predict Rate, which quantifies the percentage of subjects receiving either a True or False prediction from the RSBagging classifier for a given parameter α. A higher Predict Rate indicates a higher number of subjects that the classifier can classify. This metric is essential here because as the parameter α increases in RSBagging, some subjects may receive no final prediction.
(8)
where N⊕ and N⊖ denote the total numbers of positive and negative cases, respectively.
Experimental results and discussions
Disorder of consciousness recognition
We conducted experiments on classifying a stroke subject into one of two classes: positive with DoC, or negative without DoC. The stroke patients involve 97 subjects with DoC and 144 subjects without DoC. Two kinds of features (microstate statistic parameters and connectivity matrices) are input to classifiers to detect DoC in stroke patients.
Classification from EEG microstates features.
Firstly, we use six existing classifiers to detect DoC in stroke patients. Table 3 shows the mean of different microstate cluster (from 2 to 28) classification result. It is seen from Table 3 that the existing six classifiers Adaboost (Ada), Random Forest (RF), K-nearest neighbors (KNN), Xgboosting (XGB), Support vector machine (SVM) and Decision tree (Tree) cannot effectively detect DoC in stroke patients. Despite some classifiers achieving an accuracy higher than 80%, the sensitivity is really poor (ranging from 0 to 52%) even when employing resampling methods like Random under-sampling (Rus) and Random over-sampling (Ros). The last two rows of Table 3 present the best performance of our RSBagging model, using microstate features (with a cluster number of 16) and the PPC connectivity measure, respectively.
Then, we use our RSBagging model to detect DoC in stroke patients. Fig 6 reveals the results of the experiment. The subfigures in the first row are the results (Accuracy in subfigure A, Sensitivity in subfigure B) from the microstate feature when EEG signals are clustered to the different number of microstates (from 2 to 28 shown in the x axis). The different colour lines are the results of the different parameter α in our RSBagging. As we find the classification performance gets the best when the number of microstates clustered is 16. Therefore, we explore the classification performance when the cluster number is 16 and the accuracy, sensitivity, Predict Rate and F1-Score are shown in subfigures C, D, E and F, respectively. In the last four subfigures, the x axis is the value of parameter N in our RSBagging. N represent the number of basic SVMs in our RSBagging. We can see that with the increase of N, the classification result from the number of microstates.
From Fig 6, it is seen that the number of microstate clusters and the parameter N of RSBagging all makes an impact on the classification result. From the comparison of different microstate features in the first two subfigures, we can see that the accuracy and sensitivity from clusters 14,16 and 18 are better than the others when parameter α in our RSBagging is set to 0.5. Further observation shows that with the increase of parameter α, despite the accuracy increase, the sensitivity gets better only in the feature when the cluster number of the microstate is 16. From the last four subfigures, we can see that with the increase of parameter N in RSBagging, the accuracy, sensitivity, and F1-score rise (Fig 6C, 6D and 6F), however the Predict Rate decrease despite when α is 0.5 (Fig 6E).
Classification from EEG connectivity matrices.
The three existing classifiers SVM, RF and XGB are used to detect DoC through 11 connectivity matrices. Fig 7 shows the results from the original dataset, the dataset after random undersampling and random oversampling. From the result from the original dataset (Fig 7A and 7B), it can be seen that the accuracy from the three classifiers reaches almost 70% while the sensitivity is poor (all below 60%). After resampling the imbalanced original dataset (Fig 7C and 7D), the sensitivity from the three existing classifiers increases significantly. However, the sensitivity from after random under-sampling and random over-sampling are still below 70%.
Fig 8 reveals the classification result from our RSBagging model. Fig 8A shows the classification result from 11 connectivity matrices with the parameter α = 0.5. We can see that the four connectivity matrices (COH, PLV, PPC and wPPC) get better performance than the others with the four metrics accuracy, sensitivity, specificity and F1-score all reaching higher than 99%.
Then, we adjust the parameter α in our RSBagging model from 0.5 to 0.6 to further explore the performance of the four connectivity matrices. Fig 8B shows the result from COH, Fig 8C shows the result from PLV, Fig 8D reveals the result from PPC and Fig 8E shows the result from wPPC. It can be seen that, with the increase of the parameter α, despite the metrics Predict Rate decrease, the other four metrics increase. Among the four connectivity matrices, PPC gets the best performance with all the five metrics higher than 99.75% with the α being 0.5, PLV and wPPC are also effective features with all the five metrics higher than 98% with the α being 0.5.
Motor disturbance classification
The second kind of classification task in this study is classifying stroke patients with different kinds of motor disturbances. When doing this task, we ruled out subjects with DoC as the state of consciousness impact on the EEG signal. Therefore, the stroke subject number in this section is 106 stroke patients subjects including 23 subjects with bilateral motor disturbance, 37 subjects with left motor disturbance, and 46 subjects with right motor disturbance.
This section completes two classification tasks: subjects with left motor disturbance (37) vs subjects with right motor disturbance (46), subjects with single motor disturbance (83) vs subjects with bilateral motor disturbance (23). The feature used in these two tasks is 11 connectivity matrices as our experimental results show that the microstate feature is not effective here.
Classification from three existing classifiers.
We use the three existing classifiers to complete the two classification tasks first. Fig 9 shows the experiment results. The first four subfigures Fig 9A–9D show the classification of subjects with left vs right motor disturbance and the last four subfigures Fig 9E–9H show the classification of subjects with single vs bilateral motor disturbance. Fig 9A and 9B reveal the classification accuracy and F1-score from the original dataset and Fig 9C and 9D show the F1-score of classification from dataset after random under sampling and over sampling, respectively. Fig 9E–9H is similar to the first four subfigures despite they are the result of the task of classification of subjects with single and bilateral motor disturbance.
From Fig 9, we can see that the accuracy and F1-score for the two tasks are all below 75% even after resampling the dataset to address the imbalanced problem. Especially, for the classification of subjects with single and bilateral motor disturbance, the F1-score is below 50% even after resampling the dataset.
Classification from our RSBagging model.
As the two datasets in the classification of motor disturbance are also imbalanced, we try our RSBagging model on these two tasks. Fig 10 shows the experiment results. Fig 10A shows the classification results from 11 connectivity matrices for the classification of subjects with left vs right motor disturbance and Fig 10B shows the classification of subjects with single vs bilateral motor disturbance from 11 connectivity matrices. We can see that the three features COH, PLV and PPC get better performance than the other features in Fig 9A. In Fig 9B, the better features are GC, PDC and wPLI_de.
To further explore the six connectivity matrices that perform better than the others in the above two tasks, we adjust the parameter α in our RSBagging model from 0.5 to 0.6. Fig 9C, 9E and 9G result from feature GC, PDC and wPLI_de, respectively for the classification of subjects with single and bilateral motor disturbance. Fig 9D, 9F and 9H are the result of the classification of subjects with left vs right from the feature COH, PLV and PPC, respectively.
From the last six subfigures in Fig 10, it can be seen that, with the rise of parameter α, despite the reduction of metric Predict Rate, the other four metrics nearly all increase. More specifically, the features GC, PDC, COH, and PPC all get their best accuracy, sensitivity, specificity, and F1-Score above 99% although the Predict Rate reduces to around 60% or 80%. Therefore, we can adjust the parameter α according to the specific requirement of classification accuracy.
Stroke location classification
The third kind of classification task in this study is classifying the subject with different stroke locations according to the subjects’ MRI images. Similar to the task of motor disturbance, we ruled out subjects with DoC as the state of consciousness impact on the EEG signal. The dataset in this section contains 135 stroke subjects including 36 subjects with bilateral side stroke in the brain, 52 subjects with stroke in their left brain and 47 subjects with stroke in the right brain.
The features we used here are 11 connectivity matrices as our experimental results show that the Microstates features are not effective here. We complete two classification tasks: subjects with left brain (52) versus subjects with right brain (47), subjects with single brain side (99) versus subjects with bilateral brain side (36).
Similar to the task of motor disturbance, we also employ the existing three classifiers to complete the two tasks about stroke location first. The experimental results are shown in Fig 11. It can be seen that the accuracy and F1-score are all below 75% even though the re-sampling method is used to address the imbalanced dataset.
Then, our RSBagging model is used to complete the two tasks referring to stroke location. The experimental results are shown in Fig 12. Fig 12A reveals the classification result from 11 connectivity matrices using RSBagging with α = 0.5 for the task: stroke with left brain (52) vs stroke with the right brain. Fig 12B are results for the task of classifying subjects with the single brain side and subjects with the bilateral brain. Fig 12C and 12D are the results from a different parameter of α for two of the best connectivity matrices in Fig 12B.
From Fig 12, it is observed that the four connectivity matrices COH, PLV, PPC, and wPPC are effective in the task of classification of subjects with left-brain stroke and right-brain stroke with accuracy, sensitivity, specificity and F1-score all higher than 98%. For the task of classification of subjects with single brain side stroke and bilateral brain side stroke, the feature POWCORR is the most effective one reaching higher than 95% of accuracy, sensitivity, specificity and F1-score when the parameter of α is 0.5. The feature is the second effective feature for the same task with around 90% accuracy and higher 85% sensitivity, specificity and F1-score with α = 0.5. From Fig 12D we can see when the α increase to 0.6, the accuracy, sensitivity, specificity and F1-score all rise to higher than 98% however, the Predict Rate decrease to around 40%.
Limitations
Despite the promising results of our EEG-based stroke classification, several limitations should be acknowledged. First, the dataset lacks detailed information on patients with multiple strokes, and the absence of longitudinal data prevents us from accounting for the effects of stroke recovery on brain activity, which may introduce confounding variables. Additionally, the lack of information on neurological recovery between strokes limits our ability to analyze how recovery trajectories affect EEG signals. Future studies should incorporate longitudinal data and more comprehensive medical histories, including stroke timing and frequency, to address these gaps. Finally, while our findings are insightful, the generalizability of the results would benefit from a larger, more diverse dataset. Future research should aim to validate these findings across different stroke subtypes and recovery stages with a broader population.
Conclusion
In this study, we introduced the RSBagging model, an ensemble classifier, for the classification of the after-effects of stoke with imbalanced dataset. With this model, the classification results show that EEG connectivity matrices PPC, PLV, and wPPC are the three most effective biomarkers to monitor DoC in ischemic stroke patients. The connectivity matrices GC, PDC, and PPC are effective biomarkers that can reveal motor disturbance after stroke. For the classification of the stroke location in the brain, the connectivity matrices COH, PLV, PPC, wPPC and POWCORR are effective biomarkers. The statistical parameters from EEG microstates only show their effectiveness for the detection of DoC in ischemic stroke patients. Therefore, this study reveals the that EEG biomarkers can be used to monitor after-effects of ischemic stroke patients. In conclusion, this study reveals the that EEG biomarkers can be used to monitor after-effects with high classification performance on imbalanced datasets for ischemic stroke patients.
References
- 1. Satoko Koganemaru, Ryosuke Kitatani, Ayaka Fukushima-Maeda, et al. Gait-Synchronized Rhythmic Brain Stimulation Improves Poststroke Gait Disturbance: A Pilot Study. Stroke. 2019;50(11):3205–3212.
- 2. González B, Rodríguez M, Ramirez C, Sabaté M. Disturbance of motor imagery after cerebellar stroke. Behavioral Neuroscience. 2005;119(2):622–626. pmid:15839808
- 3. Suwatcharangkoon S, Meyers E, Falo C, Schmidt JM, Agarwal S, Claassen J, et al. Loss of consciousness at onset of subarachnoid hemorrhage as an important marker of early brain injury. JAMA Neurology. 2016;73(1):28–35. pmid:26552033
- 4. Reinkensmeyer DJ, Kahn LE, Averbuch M, McKenna-Cole A, Schmit BD, Rymer WZ. Understanding and treating arm movement impairment after chronic brain injury: progress with the ARM guide. Journal of Rehabilitation Research and Development. 2000;37(6):653–662. pmid:11321001
- 5. Finnigan SP, Walsh M, Rose SE, Chalk JB. Quantitative EEG indices of sub-acute ischaemic stroke correlate with clinical outcomes. Clinical Neurophysiology. 2007;118(11):2525–2532. pmid:17889600
- 6. Vatinno AA, Simpson A, Ramakrishnan V, Bonilha HS, Bonilha L, Seo NJ. The prognostic utility of electroencephalography in stroke recovery: A systematic review and meta-analysis. Neurorehabilitation and neural repair. 2022;36(4-5):255–268. pmid:35311412
- 7. Ajčević M, Furlanis G, Naccarato M, Miladinović A, Buoite Stella A, Caruso P, et al. Hyper-acute EEG alterations predict functional and morphological outcomes in thrombolysis-treated ischemic stroke: a wireless EEG study. Medical & Biological Engineering & Computing. 2021;59(1):121–129. pmid:33274407
- 8. Rubega M, Formaggio E, Molteni F, Guanziroli E, Felice AD. EEG Fractal Analysis Reflects Brain Impairment after Stroke. Entropy. 2021;23(5):592. pmid:34064732
- 9. Nentwich M, Ai L, Madsen J, Telesford QK, Haufe S, Milham MP, et al. Functional connectivity of EEG is subject-specific, associated with phenotype, and different from fMRI. NeuroImage. 2020;218:117001. pmid:32492509
- 10. Liu M, Xu G, Yu H, Wang C, Sun C, Guo L. Effects of transcranial direct current stimulation on EEG power and brain functional network in stroke patients. IEEE Transactions on Neural Systems and Rehabilitation Engineering. 2022;.
- 11.
Moon SE, Jang S, Lee JS. Convolutional neural network approach for EEG-based emotion recognition using brain connectivity and its spatial information. In: 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). Calgary, AB, Canada; 2018. p. 2556–2560.
- 12. Li F, Wang JJ, Liao Y, Yi C, Jiang Y, Si Y, et al. Differentiation of Schizophrenia by Combining the Spatial EEG Brain Network Patterns of Rest and Task P300. IEEE Transactions on Neural Systems and Rehabilitation Engineering. 2019;27(4):594–602. pmid:30802869
- 13. Mikulan E, Hesse E, Sedeño L, Bekinschtein T, Sigman M, del Carmen García M, et al. Intracranial high-γ connectivity distinguishes wakefulness from sleep. Neuroimage. 2018;169:265–277. pmid:29225064
- 14. Wang F, Tian YC, Zhang X, Hu F. An ensemble of Xgboost models for detecting disorders of consciousness in brain injuries through EEG connectivity. Expert Systems with Applications. 2022;198:116778.
- 15. Michel CM, Koenig T. EEG microstates as a tool for studying the temporal dynamics of whole-brain neuronal networks: a review. Neuroimage. 2018;180:577–593. pmid:29196270
- 16. Seitzman BA, Abell M, Bartley SC, Erickson MA, Bolbecker AR, Hetrick WP. Cognitive manipulation of brain electric microstates. Neuroimage. 2017;146:533–543. pmid:27742598
- 17. Corradini PL, Persinger MA. Spectral power, source localization and microstates to quantify chronic deficits from ‘mild’closed head injury: Correlation with classic neuropsychological tests. Brain Injury. 2014;28(10):1317–1327. pmid:24841927
- 18. Drissi NM, Szakács A, Witt ST, Wretman A, Ulander M, Ståhlbrandt H, et al. Altered brain microstate dynamics in adolescents with narcolepsy. Frontiers in Human Neuroscience. 2016;10:369. pmid:27536225
- 19. Tait L, Tamagnini F, Stothart G, Barvas E, Monaldini C, Frusciante R, et al. EEG microstate complexity for aiding early diagnosis of Alzheimer’s disease. Scientific reports. 2020;10(1):1–10. pmid:33077823
- 20.
Howard J, Gugger S. Deep Learning for Coders with fastai and PyTorch. O’Reilly Media; 2020.
- 21.
Rao KR, Yip P. Discrete cosine transform: algorithms, advantages, applications. Academic press; 2014.
- 22.
Swamynathan R. Mastering Machine Learning with Python in Six Steps. Apress; 2019.
- 23. Cao J, Zhao Y, Shan X, Wei Hl, Guo Y, Chen L, et al. Brain functional and effective connectivity based on electroencephalography recordings: A review. Human Brain Mapping. 2022;43(2):860–879. pmid:34668603
- 24. He B, Astolfi L, Valdes-Sosa PA, Marinazzo D, Palva S, Benar CG, et al. Electrophysiological Brain Connectivity: Theory and Implementation. IEEE Transactions on Biomedical Engineering. 2019;. pmid:31071012
- 25. Bastos AM, Schoffelen JM. A tutorial review of functional connectivity analysis methods and their interpretational pitfalls. Frontiers in systems neuroscience. 2016;9:175. pmid:26778976
- 26. Niso G, Bruña R, Pereda E, Gutiérrez R, Bajo R, Maestú F, et al. HERMES: towards an integrated toolbox to characterize functional and effective brain connectivity. Neuroinformatics. 2013;11(4):405–434. pmid:23812847
- 27. Sakkalis V. Review of advanced techniques for the estimation of brain connectivity measured with EEG/MEG. Computers in Biology and Medicine. 2011;41(12):1110–1117. pmid:21794851
- 28. Wang F, Zhang X, Hu F, Li F, Zhang Y, Tian YC. Using phase synchrony index for improved assessment of consciousness in ischemic stroke patients. IEEE Access. 2019;7:30252–30260.
- 29. Stam CJ, Nolte G, Daffertshofer A. Phase lag index: assessment of functional connectivity from multi channel EEG and MEG with diminished bias from common sources. Human Brain Mapping. 2007;28(11):1178–1193. pmid:17266107
- 30. Vinck M, van Wingerden M, Womelsdorf T, Fries P, Pennartz CM. The pairwise phase consistency: a bias-free measure of rhythmic neuronal synchronization. Neuroimage. 2010;51(1):112–122. pmid:20114076
- 31. Myers MH, Hossain G. Dual EEG alignment between participants during shared intentionality experiments. Brain Research. 2022;1790:147986.
- 32. Hipp JF, Hawellek DJ, Corbetta M, Siegel M, Engel AK. Large-scale cortical correlation structure of spontaneous oscillatory activity. Nature neuroscience. 2012;15(6):884–890. pmid:22561454
- 33. Wang F, Yang X, Zhang X, Hu F. Monitoring the after-effects of ischemic stroke through EEG microstates. Plos one. 2024;19(3):e0300806. pmid:38517874
- 34. Poulsen AT, Pedroni A, Langer N, Hansen LK. Microstate EEGlab toolbox: An introductory guide. bioRxiv. 2018; p. 289850.
- 35. Pascual-Marqui RD, Michel CM, Lehmann D. Segmentation of brain electrical activity into microstates: model estimation and validation. IEEE Transactions on Biomedical Engineering. 1995;42(7):658–665. pmid:7622149