## 4 Concept Drift Detection  
In the paper, by introducing the definition of double thresholds in Reference [9], we propose a variable sliding window detection method of concept drift. In this method, the minimum values ofthe classification error probability \(p_{\text{min}}\) and standard deviation \(\delta_{\text{min}}\) of base classifiers for data in a sliding window are set as the double thresholds to shorten the response time to gradual concept drift. At the same time, a size control strategy of the sliding window is proposed to improve the sensitivity to sudden concept drift.  
In Reference [9], three possible states of drift detection for the classification system are below.  
1. No-drift: while \(p_{t}+\delta_{t}<p_{\text{min}}+\eta\delta_{\text{min}}\).
2. In-drift: while \(p_{t}+\delta_{t}>p_{\text{min}}+\alpha\delta_{\text{min}}\).
3. Warning: while \(p_{\text{min}}+\eta\delta_{\text{min}}<p_{t}+\delta_{t}<p_{\text{min}}+\alpha \delta_{\text{min}}\) and \(\eta<\alpha\).  
Here, for instances in \(d_{t}\), the error rate of a base classifier is the probability of misclassifying \(p_{t}\) with the standard deviation given by \(\delta_{t}\). Parameters \(\eta\) and \(\alpha\) are two constants.  
Inspired by the ideas in References [6,8], we propose a size control strategy for the sliding window by introducing the sliding window idea of congestion control in the transport layer of computer networks. In computer networks, this sliding window method adaptively changes the amount of data flowing into the network by detecting the congestion threshold. It is a proven method and widely used in computer networks to effectively control network congestion and reduce data storage space [16]. Its three stages of slow start, congestion avoidance, and fast recovery coincide with the three possible states of concept drift detection. Both methods are applied to detecting data streams and identifying identical purposes and aims. In this paper, we change the sliding window size based on the data classification error probability and standard deviation. Using method migration, we aim to inherit the method's advantages in detection performance and resource use. \(w_{b}\) is the basic size of the sliding window, \(w_{t}\) is the current window size, and \(w_{t+1}\) is the next window size. Furthermore, \(L\) is the ensemble size and \(l\) is the current number of base classifiers. The size control strategy for the sliding window is below.  
1. If \(l\leq L\) and \(d_{t},t\in\{1,2,\cdots,L\}\), then \(w_{1}=w_{b}\) and \(w_{t+1}=w_{b}\).
2. If \(l=L\) and \(d_{t},t\in\{L+1,L+2,\cdots\}\), then 1. while \(p_{t}+\delta_{t}<p_{\text{min}}+\eta\delta_{\text{min}}\), trigger the slow start stage and set \(w_{t+1}=2w_{t}\); 2. while \(p_{\text{min}}+\eta\delta_{\text{min}}<p_{t}+\delta_{t}<p_{\text{min}}+\alpha \delta_{\text{min}}\), trigger the drift monitoring stage and set \(w_{t+1}=w_{t}+w_{b}\); 3. while \(p_{t}+\delta_{t}>p_{\text{min}}+\alpha\delta_{\text{min}}\), trigger the fast recovery stage and set \(w_{t+1}=w_{b}\).  
In Step 2-i, the window size is increased quickly to improve the detection efficiency of stable streams in the slow start stage. In Step 2-ii, by slowly increasing the window size, we carefully probe whether a concept drift occurs or not in the drift monitoring stage. The influence of noise can be further decreased by updating the weight of the base classifiers. In Step 2-iii, by rapidly reducing the window size, we update the ensemble classifier using the minimal number of instances and improve the sensitivity of the detection method to sudden concept drift in the fast recovery stage. If the maximum size of the sliding window \(w_{\text{max}}\) is restricted to the buffer limit, the next window size should be \(\min\{w_{t+1},w_{\text{max}}\}\).