$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
The proposed method segments EEG signals strategically into the frequency domain to improve spectral resolution. Subsequently, the captured EEG signals are epoched into 10 segments to enhance temporal resolution and consistency in feature computation. The proposed method implements an RF, XGBoost, and SVM-based classifier on derived EEG features, thereby contributing to the development of robust, scalable methods for EEG analysis. The RF model with certain hyperparameter changes has proved to be the best-performing among other standard models. Therefore, a hybrid, fused, stacked metalearner model is proposed that combines RF and XG-Boost to further improve prediction accuracy.
The dataset used in this method was collected in accordance with institutional ethical standards. The dataset providers obtained consent from participants prior to data acquisition.
1. Dataset specification
To prove the robustness of the system, two sets of data have been used. The first set of data is collected from the EEG data repository20, comprising 88 participants at the resting state eyes closed condition, where 36 were diagnosed as AD,23 of them FTD, and 29 were healthy. EEG recordings were acquired in a resting-state, eyes-closed condition using a 19-channel system following the international 10-20 montage. In the dataset shown in Figure 2, all signals were sampled at 500 Hz and provided in BIDS format with preliminary pre-processing by the dataset contributors.
The second set of data is collected from an external public repository21 comprising 35 participants at resting state. Out of which 13 participants are diagnosed with Alzheimer's disease (AD), 7 participants are mild cognitive impairment (MCI) patients, and 15 are healthy elderly. Only the resting-state baseline segments of the second dataset were used to maintain consistency with the first dataset20. The second set of data21 required a complete pre-processing pipeline, as mentioned in Figure 3.
2. Pre-processing
Existing studies rely heavily on complex pre-processing pipelines, manual artifact-correction steps, or ICA-ASR to remove muscle movements, which limit reproducibility in routine clinical workflows. To address these limitations, the proposed pipeline focuses on a streamlined EEG-only approach that eliminates the need for computationally intensive artifact-removal procedures and instead emphasizes controlled filtering, epoch segmentation, and frequency-specific feature computation.
- EEG file sorting
Before pre-processing, all EEG files were automatically sorted to maintain a consistency of participant-wise and session-wise ordering. This ensured that feature extraction, epoching, and label alignment were uniform across all subjects and prevented file-mismatch errors. This step is displayed in Figure 3 as "Sort EEG file." All pre-processing is done using a standard open-source EEG-processing toolkit.
- Bandpass filtering and re-referencing
A Butterworth bandpass filter was applied in the range of 0.5-40 Hz to retain relevant EEG components while attenuating drift and high-frequency noise. Signals were re-referenced to the average of all EEG channels, thereby minimizing spatial bias and enhancing the signal-to-noise ratio.
- Nyquist frequency shift
To improve the resolution of low-frequency components, a Nyquist-shift enhancement was applied by halving the sampling frequency from 500Hz to 250Hz. Following the above step, the Nyquist modification reduces it to 125Hz. As the Delta, Theta, Alpha, Beta, and Gamma frequencies are slow waves ranging from 0.5-40 Hz, this shifts the effective Nyquist limit and enhances the clarity of low-frequency oscillations, relevant to dementia. This modification helped to capture slow brain waves more appropriately. Equation (1) shows the Nyquist medication result clearly.
Fsampling= 500 Hz
Nsampling= Fsampling/2
Nnyquist= Nsampling/2 (1)
It is important to note that Nnyquist is not the operating sampling rate but simply the maximum representable frequency , and therefore does not affect epoch segmentation. It's only a theoretical limit used to guarantee that the frequency content of interest (0.5-40 Hz) is fully preserved.
- Epoch sampling frequency to 10 segments
The EEG recordings are divided into 10 equal-length segments. This step is essential to capture the non-stationary activity of the EEG signal over time. The Short, uniform segments allow stable computation of band-specific features and enrich training samples for machine-learning classification. Therefore the 250 samples per second become 250 × 10 = 2500 samples. Finally, 10 equal-length epochs per subject are taken for epoch-wise analysis strategies. This analysis strategy generated 880 samples for 88 actual participants.
The need for epoch-wise analysis is to monitor brain signal changes minutely, thereby providing the model with an ample amount of temporal data to learn and prevent overfitting. The significance of this approach is to ensure finer-grained EEG epoch data, facilitating analyses that require higher temporal resolution without compromising total feature values. By generating 10-second epochs, the methodology supports improved modelling of EEG dynamics and aligns with standard epoch durations in EEG analysis protocols.
3. Feature extraction
The pre-processed EEG signals are passed to feature-extraction methods. EEG signals are bandpass-filtered into 5 standard frequency bands: Delta (0.5-4 Hz), Theta (4-8 Hz), Alpha (8-13 Hz), Beta (13-25 Hz), and Gamma (25-40 Hz).
For each filtered signal, the Root Mean Square (RMS) value was computed across all EEG channels. The mathematical formulation of RMS is given in Equation (1):
RMS =
(1)
Here, xi is the EEG signal amplitude at the i th time sample. N is the total number of samples in the signal segment.
RMS was selected as the primary feature due to its ability to quantify the energy of oscillatory activity in each frequency band. Alzheimer's disease is often associated with increased delta and theta activity and reduced alpha and beta activity. Fronto-temporal dementia (FTD) may exhibit distinct patterns across these bands20,21. As PSD is mathematically redundant to RMS, it is not considered a feature. To maintain a compact dataset, the remaining features, such as Hjorth and Entropy, are excluded.
4. Hybrid fusion
Extracted time-domain RMS features were combined with frequency domain features received from bandpass filtering by making it a hybrid space for model input. The detail of compilation is shown in Figure 3. The final normalized dataset is organized into a tabular format with rows representing participants and columns representing time-frequency band features and demographic features such as age, gender, and group. The pipeline shown in Figure 2 efficiently extracts EEG features relevant for Alzheimer's research. The extracted features provide insights into neural activity within key frequency bands and can be utilized for machine learning and statistical analysis.
5. Feature Selection
To improve model's performance and reduce feature dimensionality, a 2-way Analysis of Variance (ANOVA)-based approach was applied. The ANOVA-based selection was applied with Group and age as independent factors, and RMS frequency bands as dependent features. This analysis evaluated the effects of Group, Age, and Age-Group interaction on each feature. Features with p-values < 0.05 for at least one factor were selected for further classification. The detailed ANOVA-based results are shown in the results section. These features are the most informative variables for classification, which helped improve the accuracy and generalization of the final predictive model. As a result of the ANOVA test, only the most informative features were selected for model creation. And the additional non-numeric attributes, Gender and participant_id, were excluded from the analysis. The target variable Group was label-encoded for classification.
6. Model description
To classify the disease into 3 classes, namely Alzheimer's, Control, and Frontal dementia, three supervised machine learning models, such as XG-Boost, Random Forest, Support Vector Machine SVM, and a Stacked model, were built. All of the mentioned models used 70% of the training dataset and 30% of the test dataset. Each model was selected for its proven performance in healthcare data analysis and its ability to handle non-linear and high-dimensional feature spaces. Evaluation of the model was conducted on the validation dataset to assess the generalizability of the model.
The model performance was evaluated using a confusion matrix, comprising true positive (TP), false positive (FP), true negative (TN), and false negative (FN). Performance metrics included accuracy and a classification report detailing precision, recall, and F1-scores for each class. The following Equation illustrates performance metrics.
(2)
(3)
(4)
(5)
1. XG-Boost classifier
This method implemented a multi-class classification model using the XGBoost algorithm to predict EEG-derived cognitive states from extracted features, as shown in output 1 of Figure 3. Output 1 contains RMS features and the MMSE score. While building the XGBoost model, the MMSE score is included to test the non-linear behaviour of the RMS features. It is used as a benchmark and baseline for the system development. MMSE was excluded in later stages to meet the goal of a fully automated, clinician-independent system.
XG-Boost is a gradient boosting framework optimized for efficiency and accuracy, making it well-suited for handling structured data in classification tasks. The few hyperparameters are tuned on the EEG dataset using techniques like cross-validation and grid search. The key parameter values defined below are chosen to control overfitting via regularization and to capture the complexity of the EEG features without being too complex.
The Key Parameters of the Model are: (1) Maximum Tree Depth = 8, which limits the depth of decision trees to reduce overfitting and enhance generalization. Because a shallow tree would miss unnecessary information, as a deeper tree may overfit. (2) L2 Regularization (λ = 10) adds a penalty for large coefficients to minimize overfitting by controlling model complexity. (2) L1 Regularization (α = 5) is introduced to give additional sparsity in the model to improve interpretability and robustness. The number of Estimators (n_estimators=8) limited the number of boosting iterations to maintain computational efficiency while balancing performance.
2. Random Forest classifier
Random Forest is an ensemble classifier that builds multiple decision trees on random subsets of data and features, aggregating their outputs for the final prediction. It offers robustness to noise, handles non-linear data well, and reduces over-fitting by averaging diverse tree predictions. In this work, the Random Forest model was configured with key parameters by using the trial-and-error method. Such parameters are explained below:
1) n_estimators=100
It is chosen to limit the number of decision trees in the forest. The more trees, the better the generalization and the more stable the predictions.
2) max_depth=10
It indicates the maximum depth of each tree. If the tree has low depth, there is a chance of underfitting. Whereas high depth may capture detail and memorize the training data, it may overfit. Therefore, choosing 10 is a sweet spot, especially for noisy or complex signals like EEG.
3) random_state=40
It fixes the random number generation seed used for Bootstrap sampling and Tree construction. This ensures reproducibility
4) n_jobs=-1
By setting the value of n_jobs to -1, the model is making use of all the CPU cores efficiently.
7. Support Vector Machine (SVM)
Support Vector Machine is a margin-based classifier known for its linear performance in binary and multi-class classification22. This model used a radial basis function kernel because of its ability to capture non-linear EEG signals. However, the model exhibited suboptimal performance, likely due to the lack of feature scaling and the limited dataset size. While SVM is theoretically powerful, its sensitivity to hyperparameter tuning and data distribution may explain the lower accuracy observed compared to tree-based models.
8. Proposed HY-fusion model
Though the Random Forest model achieved high accuracy, to ensure generalizability and scalability, a stacked model was built with Random Forest and XG-Boost. The output is fed as input to a logistic regression model. And logistic regression acts as a metalearner. The architecture diagram of the model is given in Figure 4.
Along with 1st set of input20, the stacked model also took input from the second set of data23. The dataset from Mendely21 is pre-processed to a model-understandable form by extracting RMS and epoching to 10 s. The results obtained by each model are shown in the results section.