## 4 Packet Loss Differentiation Model Based on Heterogeneous Ensemble Learning  
Considering the classification process, the performance of different classifiers may vary with changes in the dataset. Single classifiers often exhibit high error rates, while combining multiple classifiers can effectively reduce errors and enhance model generalization ability. Hence, this paper adopts an ensemble learning model. To ensure that individual classifiers within an ensemble classifier are \"good but different\", it is common practice to employ diverse types of classifiers. Research has shown that heterogeneous classifiers tend to have higher diversity compared to homogeneous ones. Moreover, using heterogeneous ensembles can help mitigate potential biases resulting from inherent assumptions in each classification method and thus improve overall diversity. Consequently, six classification algorithms (LSSVM, DT, LR, KNN, BP neural network, and naive Bayes) were selected as initial individual classifiers for heterogeneous ensemble learning; subsequently simplified based on the principle of being \"good but different\". In this study, the \(Q\)-statistic and DF value were employed to investigate the disparities among the aforementioned six individual classifiers. Let \(C_{i}\) and \(C_{j}\) represent two distinct classifiers. \(N^{11}\) denotes the number of samples correctly classified by both classifiers, while \(N^{00}\) represents the number of misclassified samples by both classifiers. Additionally, \(N^{10}\) indicates instances in which \(C_{i}\) was accurately classified and \(C_{j}\) was misclassified. \(N^{01}\) represents cases in which \(C_{i}\) was incorrectly classified and \(C_{j}\) was correctly classified by the classifier. The \(Q\)-statistic and DF value are subsequently computed using the following formulas. \[Q_{ij}=\frac{N^{11}N^{00}-N^{10}N^{01}}{N^{11}N^{00}+N^{10}N^{01}} \tag{7}\]  
\[\text{DF}_{ij}=\frac{N^{00}}{N^{11}+N^{00}+N^{10}+N^{01}} \tag{8}\]  
According to the aforementioned equations, the \(Q\)-statistic value ranges from \(-1\) to \(1\), while the DF value ranges from \(0\) to \(1\). A smaller value indicates a higher level of diversity in this pair of individual classifiers. In order to integrate outputs from various individual classifiers within a heterogeneous ensemble learning framework and enhance learner output effectiveness in the ensemble learning algorithm, voting methods such as majority voting or weighted voting are commonly employed. The majority voting method is ineffective in utilizing the complementary information of each individual classifier. Therefore, we propose an adaptive dynamic weighted ensemble method to dynamically adjust the voting weight of each individual classifier, aiming to enhance the generalization ability of the ensemble learning algorithm for the loss cause detection model. Figure 1 illustrates the heterogeneous ensemble learning model. Let \(D^{\prime}=\left\{(\boldsymbol{x}^{\prime}_{i},y_{i})\Big{|}\boldsymbol{x}^{ \prime}_{i}\in\mathbf{R}^{m^{\prime}},m^{\prime}>0,y_{i}\in\{1,-1\},i=1,2, \cdots,n^{\prime}\right\}\) be the subset of features generated using the feature selection algorithm, and the Sigmoid function is adopted as the default regression function for each individual classifier, i.e.,  
\[\ell(\boldsymbol{x}^{\prime})=\frac{1}{1+e^{-\theta^{T}\boldsymbol{x}^{\prime}}} \tag{9}\]  
Suppose that the output of the \(i\)th individual classifier is \(h_{i}(\boldsymbol{x}^{\prime})\), then  
\[h_{i}(\boldsymbol{x}^{\prime})=\left\{ \begin{array}{ll}1,&\ell(\boldsymbol{ x}^{\prime})\ \geq 0.5\\ -1,&\ell(\boldsymbol{x}^{\prime})\ <0.5\end{array} \right. \tag{10}\]  
The Sigmoid function is employed to regress the output as follows:  
\[p(w_{1},w_{2},\cdots,w_{M})=\frac{1}{1+e^{-\sum\limits_{i=1}^{M}\sum\limits_{ \boldsymbol{x}^{\prime}\in D_{i}}w_{i}\times h_{i}(\boldsymbol{x}^{\prime})}} \tag{11}\]  
Figure 1: Packet loss differentiation model based on heterogeneous ensemble learning.