## 3 Methodology
### Dataset and Preprocessing  
In this work, an open-access EEG dataset provided by [23] was adopted to evaluate the performance of multiple machine learning algorithms. This study uses a subset of the dataset from [23], focusing solely on depressive disorder, whereas the original dataset includes multiple psychiatric disorders. The dataset includes preprocessed EEG data for 95 healthy controls (HCs) and 199 with depressive disorder. Data were collected retrospectively from medical records, psychological assessment batteries, and quantitative EEG (QEEG) at resting-state assessments from January 2011 to December 2018 from the Seoul Metropolitan Government-Seoul National University (SMG-SNU) Boramae Medical Center in Seoul, South Korea. The EEG signals were preprocessed using the NG Deluxe 3.0.5 system, involving several steps. First, the data underwent down-sampling to 128 Hz. The baseline EEG was then identified by applying a filtering process at <1 Hz and >40 Hz using 5 th order Butterworth filters. The spliced selections of EEG were filtered a second time with the same parameters after finding the baseline EEG. NeuroGuide utilized a splicing method to append edited selections of EEG, followed by baselining using Butterworth high-pass and low-pass filters at 1 Hz and 55 Hz, respectively [23]. Subsequently, 19 channels with the linked-ear reference were selected for analysis based on the International 10-20 System. Artifacts, such as those from eye blinks, movements, and drowsiness, were eliminated through visual inspection and the NG Deluxe 3.0.5 cleaning system. Continuous EEG data were then transformed into the frequency domain using Fast Fourier Transformation (FFT) with specific parameters, including an epoch of 2 s, a sample rate of 128 samples/s, and a frequency range of 0.5-40 Hz [23]. A minimum epoch length of 60 s was chosen to address noise in the FFT results. Frequency bands were as follows: beta (12-30 Hz), alpha (8-12 Hz), theta (48 Hz), and delta (0.5-4 Hz). A total of 19 of the 64 channels with the linked-ear reference were selected for the analysis based on the international 10-20 system: FP1, FP2, F7, F3, Fz, F4, F8, T3, C3, Cz, C4, T4, T5, P3, Pz, P4, T6, O1, and O2, as shown in Figure 1 (developed using MNE-Python). The calculation of each EEG parameter was performed within specific frequency bands: delta (1-4 Hz), theta (4-8 Hz), alpha (8-12 Hz), beta (12-25 Hz), high beta (25-30 Hz), and gamma (30-40 Hz). Power spectral density (PSD) represents the actual spectral power measured at the sensor level. It quantifies the power of different frequency components of the EEG signal. The absolute power value was extracted for each frequency band. Functional connectivity (FC) was quantified using coherence, a measure of synchronization between two signals based on phase consistency [23]. FC is the strength to which activity between a pair of brain regions covariates or correlates over time. The decision to use only PSD and FC as features for depression detection using EEG is based on their strong relevance to the neurophysiological mechanisms underlying depression. Both PSD and FC offer insights into brain activity and connectivity patterns, which are crucial for understanding mood disorders. Research indicates that individuals with depression often show increased theta activity and decreased alpha activity [24,25]. By focusing on PSD, the model can capture these frequency-specific changes. Additionally, disrupted FC patterns, particularly within networks like the Default Mode and Executive Control Networks, have been observed in depressed individuals [26]. Alterations in FC are linked to cognitive dysfunctions seen in depression, such as impaired attention and executive function [27]. Additionally, both features are more robust to noise in EEG signals, offering better stability compared to raw time-domain data [28]. Figure 2 presents topoplots visualizing the average PSD of EEG activity for different frequency bands (delta, theta, alpha, etc.) in healthy controls and individuals with depression.