## 5 Ensemble Classification Algorithm of Data Streams  
In this paper, we use the proposed approximate attribute reduction algorithm to reduce the computation complexity of the ensemble classification algorithm. The variable sliding window method is used to improve the sensitivity of the ensemble classification algorithm to become a sudden concept drift and the concept drift detection method based on double thresholds is used to improve the sensitivity of the ensemble classification algorithm with regard to noise and gradual conceptual drift. The pseudocode of the ensemble classification algorithm is given in Algorithm 2. In Algorithm 2, \(L\) base classifiers are generated in line 2-3 and the window size is \(w_{b}\). In line 5-7, the concept drift is detected. The base classifiers and the window size change when the detection result changes. The weights \(\omega_{tj}\) of the \(j\)th base classifier are calculated by estimating the error rate in data chunk \(d_{t}\), which is shown in Equation (2) [5; 10]. \[\left\{ \begin{array}{l}MSE_{r}=\sum\limits_{y}p(y)(1-p(y))^{2}\\ MSE_{tj}=\frac{1}{|d_{t}|}\sum\limits_{\{x,y\}\in d_{t}}\left(1-f_{y}^{j}(x) \right)^{2}\\ \omega_{tj}=\frac{1}{MSE_{r}+MSE_{tj}+\xi}\end{array} \right. \tag{1}\]  
where \(MSE_{r}\) is the mean square error of a randomly predicting classifier and is used as a reference point for the current class distribution with \(p(y)\) being the probability of selecting class \(y\). Function \(f_{y}^{j}(x)\) denotes the probability given by the \(j\)th classifier that \(x\) is an instance of class \(y\). Additionally, a very small positive value \(\xi\) is added to the equation to avoid division by zero problems. In Algorithm 2, lines 2, 3, and 7 ensure the difference between base classifiers through reduced data generating base classifiers. The weight updating of base classifiers in line 6 ensures the classification precision of the ensemble classifier while filtering the influence of noise. Moreover, line 7 improves the sensitivity of the ensemble classification algorithm toward concept drift by updating the reduced attributes, base classifiers, and weights of base classifiers. ```
Input: Data stream \(\mathbf{D}\), current data chunk \(d_{t}\), correction coefficient \(\varepsilon\in[0.9,1]\), approximation precision factor \(\beta\in(0.5,1]\), approximation \(\delta\in[0.9,1]\), ensemble size \(L\), current number of base classifiers \(l\), basic window size \(w_{b}\) Output: Classification results for instances in \(d_{t}\)
1:\(w_{1}=w_{b}\);
2:If\(l<L\) and \(d_{t},t\in\{1,2,\cdots,L-1\}\), \(w_{t+1}=w_{b}\). Obtain the training sets to generate the base classifiers using Algorithm 1. Update the weights of the base classifiers using their classification error rate. Use the voting method to integrate the classification results of the base classifiers;
3:If\(l=L\) and \(d_{t}=d_{L}\), perform the same operations as shown in line 2 and save the values of \(p_{\text{min}}\) and \(\delta_{\text{min}}\). 4:If\(l=L\) and \(d_{t},t\in\{L+1,L+2,\cdots\}\), then:
5:While \(p_{t}+\delta_{t}<p_{\text{min}}+\eta\delta_{\text{min}},w_{t+1}=2w_{t}\). Update the values of \(p_{\text{min}}\) and \(\delta_{\text{min}}\) and use the voting method to integrate the classification results of the base classifiers. 6:While \(p_{\text{min}}+\eta\delta_{\text{min}}<p_{t}+\delta_{t}<p_{\text{min}}+\alpha \delta_{\text{min}}\), \(w_{t+1}=w_{t}+w_{b}\). Update the weights of the base classifiers and the values of \(p_{\text{min}}\) and \(\delta_{\text{min}}\). Use the voting method to integrate the classification results of the base classifiers. 7:While \(p_{t}+\delta_{t}>p_{\text{min}}+\alpha\delta_{\text{min}}\), \(w_{t+1}=w_{b}\). Using Algorithm 1, obtain new training sets to generate new base classifiers. Use the new base classifier to replace the old base classifier of the maximum error rate where the maximum replacement number is \(L\). Update the weights of the base classifiers and the values of \(p_{\text{min}}\) and \(\delta_{\text{min}}\).