## 3 Materials and Methods
### Global System Implementation
This sensitivity is particularly significant when dealing with imbalanced datasets or overlapping features, as logits inherently capture the raw model confidence for each class. However, interpreting logits directly is challenging because they are not normalized or interpretable as probabilities. Instead, transforming logits into probabilities enables better understanding and practical use, such as ranking class likelihoods or making probabilistic predictions [38]. On the other hand, raw logits preserve this small difference, which is valuable for a meta-classifier. Using logits allows flexible and adaptable combinations of basic models and avoids information compression problems. As part of a meta-classifier, it produces more accurate final predictions [39]. It is important to note that the method ultimately allows models that perform better in certain classes to have a greater influence on the final prediction. Thus, the \(F1\) score was calculated using the validation dataset for each model \(i\) and class \(c\) (\(F1_{c,i}\)). The formula for the \(F1\) score (2) contained precision (3) and recall (4). \(TP_{c,i}\), \(FP_{c,i}\), and \(FN_{c,i}\) represent true positives, false positives, and false negatives, respectively, for class \(c\) and neural network \(i\)[35]:  
\[F1_{c,i}=\frac{2\cdot Precision_{c,i}\cdot Recall_{c,i}}{Precision_{c,i}+Recall _{c,i}} \tag{2}\]  
\[Precision_{c,i}=\frac{TP_{c,i}}{TP_{c,i}+FP_{c,i}} \tag{3}\]  
\[Recall_{c,i}=\frac{TP_{c,i}}{TP_{c,i}+FN_{c,i}} \tag{4}\]  
The next step was to generate the weight matrix \(W\) for the meta-classifier. \(W\) has size \(L\times N\), where \(L\) is the number of classes and \(N\) is the number of models. Each element of the matrix \(w_{c,i}\) was calculated using the expression (5), where \(w_{c,i}\) is the weight of the model \(M_{i}\) associated with class \(c\), and \(F1_{c,i}\) is the \(F1\) score for model \(i\) and class \(c\):  
\[w_{c,i}=\frac{F1_{c,i}}{\sum_{j=1}^{N}F1_{c,j}} \tag{5}\]The weight matrix \(W\) can be completed as in (6), where each column corresponds to a model, and each row corresponds to a class:  
\[W= \begin{bmatrix}w_{1,1}&w_{1,2}&\ldots&w_{1,N}\\ w_{2,1}&w_{2,2}&\ldots&w_{2,N}\\ \vdots&\vdots&\ddots&\vdots\\ w_{L,1}&w_{L,2}&\ldots&w_{L,N}\end{bmatrix}  \tag{6}\]  
Weighting the _logit_ using the weight matrix is another important step in system implementation. Using the matrix, the _logit_ generated by each model for each class was weighted. The weighted logit for a sample \(x\) and class \(c\) is (7):  
\[logit_{weight}\ (c\mid x)=\sum_{i=1}^{N}w_{c,i}\cdot logit_{M_{i}}\ (c\mid x) \tag{7}\]  
The weighted _logit_ was scaled before being entered into the logistic regression area (8):  
\[z_{scaled}(c\mid x)=Scaler(logits_{weight}\ (c\mid x)), \tag{8}\]  
where \(z_{scaled}(c\mid x)\) represents the weighted and scaled logit for a sample \(x\), and _Scaler_ is a scaling operation of type Standard _Scaler_ (taken for the present case from the sklearn preprocessing library) that transforms the data to have a standard deviation of 1 and a mean of 0. Further, logistic regression was used as a meta-classifier. Logistic regression will predict the probability (9) that a given sample \(x\) belongs to class \(c\) using the previously mentioned weighted and scaled _logit_:  
\[p(c\mid x)=\frac{exp(\beta_{c}^{T}\ z_{scaled}(c\mid x))}{\sum_{k=1}^{L}exp( \beta_{k}^{T}\ z_{scaled}(c\mid x))}, \tag{9}\]  
where \(\beta_{c}^{T}\) are the coefficients for class c as part of logistic regression, and \(p\ (c\mid x)\), in this case, describes the probability that sample \(x\) belongs to class \(c\).