## 3 Materials and Methods
### Depression Detection Model  
After analyzing the feature framework, our next objective is to take advantage of it in the development of a machine-learning model capable of detecting the intensity of depressive symptoms in the textual data. The problem to be solved is the detection of the depression severity level \(l_{i}\) expressed in a post \(p_{i}\). According to the datasets considered (see Section 3.1), \(l_{i}\in\{\text{Minimal},\text{Mild},\text{Moderate},\text{Severe}\}\) for the DsD dataset, and \(l_{i}\in\{\text{Not depressed},\text{Moderate},\text{Severe}\}\) for the DepSign dataset. To achieve this, we pro  
Figure 2: The distribution of the information gain value for features within each set is examined for both datasets. pose an ensemble model [67] that combines lexicon-based features with distributional representations. An overview of the proposed approach can be seen in Figure 3.  
Specifically, this model combines the lexicon-based feature vector derived from each post instance (\(p_{i}\)) with the vector that contains the distributional representation of it. Concatenation of both vectors results in a unified vector that encapsulates pertinent information from both lexicon-based features and distributional representations. The lexicon-based feature vector is derived from the framework elucidated in Section 3.2, which contains features from different categories: affective, social, syntactic, and topic-related. Given the set of categories considered \(C=\{C_{A},C_{SO},C_{SY},C_{T}\}\), we can define the set of features included in our framework as follows:  
\[F\equiv\Big{\{}\ f_{c,n}\ |\ \ c\in C,\ n\in[1,N_{c}]\ \Big{\}}=F_{A}\cup F_{SO}\cup F_{SY} \cup F_{T} \tag{2}\]  
where \(F_{A}\), \(F_{SO}\), \(F_{SY}\), and \(F_{T}\) are the set of features included in the affective, social, syntactic, and topic categories, correspondingly, and \(N_{c}\) is the number of features included in each category. Accordingly, given a post under analysis \(p_{i}\) and the total set of features \(F\), an annotation vector \(A_{i}\) is extracted. This vector contains the numeric annotations that express the intensity of each feature in that post; that is, \(A_{i}=\Big{\{}a_{f_{c,n}}\ |\ \ f_{c,n}\in F\Big{\}}\). The construction of the feature vector \(A_{i}\) is shown in Algorithm 1. For each category (\(c\)) of the framework, the set of features that compound it (\(F_{c}\)) is extracted. The annotation of the post \(p_{i}\) for each feature \(f_{c,n}\) of that category is extracted through the _annotation_ function. Finally, the annotations of all features \(a_{f_{c,n}}\) are concatenated through the _concat_ function, resulting in the annotation vector \(A_{i}\). This vector encloses the linguistic signals, emotional expressions, and cognitive patterns present in the post. ```
0: Set of categories \(C\) included in the feature framework, each of them composed by the set of features \(F_{c}\); and an input post \(p_{i}\)
0:\(A_{i}\in\mathbb{R}^{N}\) for all\(c\in C\)do \(F_{c}\gets f_{n}\ |\ n\in[1,N_{c}]\) for all\(f_{c,n}\in F_{c}\)do \(a_{f_{c,n}}\gets annotation(p_{i},f_{c,n})\) endfor endfor \(A_{i}\getsconcat(a_{f_{c,n}})\)
```  
**Algorithm 1** Feature extraction algorithm  
To compute the distributional representation of the post, word embedding techniques are used [38]. Word embeddings encompass a form of computing distributed text representation, facilitating the assignment of similar representations to words with similar meanings. Figure 3: General architecture representation of the proposed model. The process of obtaining this representation varies depending on the specific word embedding method. While context-independent methods (i.e., GloVe, FastText) employ neural networks or co-occurrence matrix factorization to learn word representations that are unique and distinct for each word without considering its context, context-dependent methods generate distinct embeddings for the same word depending on the context in which it appears.