# Precision-Based Weighted Blending Distributed Ensemble Model for Emotion Classification
## 3 The Proposed Method
### Precision Based Weighed Blending Ensemble Learning  
Ensemble approaches generate several models, which are then combined to get better results. Ensemble approaches are capable of producing more precise results than a single model. The production of base learners is the initial stage in the ensemble model. The production of base learners can be done in two ways: sequential or parallel. The base learners are generated sequentially in the sequential technique, while they are generated in parallel in the parallel method. The selection of component classifiers based on their efficiency is a crucial stage in the ensemble technique. The second key stage in ensemble learning is to combine the predictions of individual classifiers, which is done using a variety of strategies. The proposed method selects a group of classifiers and applies them to a dataset, then combines their separate predictions using a new weighted methodology. Logistic regression (LR), decision trees, and naive Bayesian classifiers were employed in this study. LR will not get caught in a local minimum because it uses a convex loss function. The logistic regression model is a simple, rapid, and straightforward classification method. The parameters are used to explain the degree and direction of the independent variable's influence on the dependent variable. It can also be used to classify multiple classes. A decision tree is a tree-based method for dealing with problems such as regression and classification. An inverted tree with branches spreading off from a homogeneous probability distributed root node to severely heterogeneous leaf nodes is used to produce the result. Regression trees are used for dependent variables with continuous values, while classification trees are used for dependent variables with discrete values. The decision tree enables automatic feature interaction, while also being faster. Decision trees are more successful when there are a large number of categorical characteristics. A naive Bayes classifier, in basic words, posits that the existence of one feature in a class is independent to the presence of any other feature. The text categorization industry is the primary focus of naive Bayes. It is mostly used for grouping and classification purposes, and it is based on the conditional chance of something happening. As shown in Figure 2, we employed a weighted blending-based ensemble technique to classify emotions. As a result, the emotion dataset was split into two parts: training and testing. Out of the whole dataset, 80% was taken for training and 20% for testing. The validation set is made up of a small piece of the training set. The features obtained from transfer learning and the labels on emotion face images were fed into the three classifiers, resulting in three trained models. The validation set is given as input to these models in the second stage. The precision value of each model is calculated based on the predictions provided by the three models on the validation set. The weighted precision value of a classifier in a multiclass classification problem can be calculated by taking the precision for each class label and finding their average weighted by a support factor, which can be the number of true instances for each class label. The weighted precision value of a classifier in a multiclass classification problem is shown below in Equation (1) [35]:  
\[\frac{1}{\sum s\varepsilon S|\hat{y}_{l}|}\sum s\varepsilon S|\hat{y}_{l}|P \big{(}y_{j},\hat{y}_{j}\big{)} \tag{1}\]  
where,  
\(Y\) is the set of predicted (sample, label) pairs,  
\(\hat{y}\) is the set of true (sample, label) pairs,  
\(\hat{y}_{j}\) is the subset of \(\hat{y}  
In the next stage, the weighted precision value that we found earlier is taken as input. This step uses a weight matrix, as shown below in Equation (2):  
\[\text{W}=\left[ \begin{array}{ccc}P_{1}C_{10}&\cdots&P_{1}C_{15}\\ \vdots&\ddots&\vdots\\ P_{3}C_{30}&\cdots&P_{3}C_{35}\end{array}