A comprehensive exploration of machine learning techniques for EEG-based anxiety detection

PeerJ Comput Sci. 2024 Jan 25:10:e1829. doi: 10.7717/peerj-cs.1829. eCollection 2024.

Abstract

The performance of electroencephalogram (EEG)-based systems depends on the proper choice of feature extraction and machine learning algorithms. This study highlights the significance of selecting appropriate feature extraction and machine learning algorithms for EEG-based anxiety detection. We explored different annotation/labeling, feature extraction, and classification algorithms. Two measurements, the Hamilton anxiety rating scale (HAM-A) and self-assessment Manikin (SAM), were used to label anxiety states. For EEG feature extraction, we employed the discrete wavelet transform (DWT) and power spectral density (PSD). To improve the accuracy of anxiety detection, we compared ensemble learning methods such as random forest (RF), AdaBoost bagging, and gradient bagging with conventional classification algorithms including linear discriminant analysis (LDA), support vector machine (SVM), and k-nearest neighbor (KNN) classifiers. We also evaluated the performance of the classifiers using different labeling (SAM and HAM-A) and feature extraction algorithms (PSD and DWT). Our findings demonstrated that HAM-A labeling and DWT-based features consistently yielded superior results across all classifiers. Specifically, the RF classifier achieved the highest accuracy of 87.5%, followed by the Ada boost bagging classifier with an accuracy of 79%. The RF classifier outperformed other classifiers in terms of accuracy, precision, and recall.

Keywords: Anxiety detection; Artificial intelligence; Electroencephalogram; Ensemble learning; Feature extraction; Machine learning.

Grants and funding

This work was supported and funded by the Deanship of Scientific Research at Imam Mohammad Ibn Saud Islamic University (IMSIU) grant number (IMSIU-RG23079). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.