## 3 Proposed Method--Depression Ensemble Stacking Generalization Model (DESGM)
### Linear Discriminant Analysis (LDA)  
LDA is a widely employed method in the field of machine learning and data analysis for the purpose of reducing the dimensionality of a dataset. The objective is to determine an optimal linear transformation that maximizes the degree of separation between distinct classes. The above scenario states that each class consists of \(\mathrm{N_{k}}\) samples in the real d-dimensional space, where \(\mathrm{k}\) represents the class index ranging from 1 to \(\mathrm{c}\).
* Let \(\mathrm{X_{k}}\) be the collection of d-dimensional samples for class \(\mathrm{k}\), represented as \(\left\{\mathrm{x}^{(1)},\mathrm{x}^{(2)},\ldots,\mathrm{x}^{(\mathrm{N_{k}})}\right\}\).
* Let \(\mathrm{X}\in\mathbb{R}^{d\times N}\) be the data matrix, stacking all the samples from all classes, with each column representing a sample, where \(\mathrm{N}=\sum_{\mathrm{k}}\mathrm{N_{k}}\).
* Let us specify how samples \(\mathrm{x}\) are transformed onto a line in [(\(\mathrm{c}\) 1)-space, for \(\mathrm{c}=2\)]. \(\mathrm{z}=\mathrm{w}^{\mathrm{T}}\mathrm{x}=\mathrm{w}\cdot\mathrm{x}\), subject to \(\mathrm{w}\in\mathbb{R}^{d}\) is a projected vector.  
Hence, the LDA algorithm aims to identify a linear projection that minimizes the distance between samples belonging to the same class while maximizing the separation between the projected class means.  
Meta-Learner--Logistic Regression (LR)  
LR maximizes model stability while increasing the trustworthiness of the foundational paradigm. Multiple researchers utilized it as the linear meta-learner within stacked ensembles. Based on the literature study, it has been observed that LR is the most widely used meta-learner in the context of the stacked ensemble for classification with imbalances [40]. It estimates the logit of the probabilities associated with each possible combination of predictors and responses. Predictive modeling uses this property considerably by calculating the mathematical possibility that a given instance is depressed or not depressed.  
\[\mathrm{logit}\big{(}\mathrm{P_{y}}\big{)}=\log_{\mathrm{e}}\bigg{(}\frac{ \mathrm{P_{y}}}{1-\mathrm{P_{y}}}\bigg{)}=\sum_{\mathrm{i}=0}^{n}\alpha_{ \mathrm{i}}\mathrm{X_{i}} \tag{13}\]  
The variable \(\mathrm{P_{y}}\) represents the likelihood of \(\mathrm{Y}\) being equal to 1, corresponding to depression. Conversely, \(1-\mathrm{P_{y}}\) means the chance of \(\mathrm{Y}\) being equal to 0, indicating the not depressed class. The unknown regression coefficients, denoted as \(\alpha_{\mathrm{i}}\) (where \(\mathrm{i}\) ranges from 1 to \(\mathrm{k}\)), are the parameters to be estimated. In this context, \(\mathrm{k}\) represents the total number of predictors, precisely 62 factors. The predictors themselves are denoted as \(\mathrm{X_{i}}\) (where \(\mathrm{i}\) ranges from 1 to \(\mathrm{k}\)), with \(\mathrm{X_{0}}\) equal to 1. The values of the regression coefficients can be determined from the maximum likelihood of the factor using the given equation.  
\[\Phi(\mathrm{x})=\mathrm{P}=\frac{1}{1+\mathrm{e}^{-\mathrm{x}}} \tag{14}\]  
The above formula is employed for the purpose of mapping the outcomes within the range from 0 and 1. It involves assigning weights to each feature of a sample, combining the weighted outcomes with \(\Phi(\mathrm{x})\), and determining the sample's class based on the magnitude of the result in comparison to a predefined threshold.