## 3 Proposed Algorithms
### Variance Estimation
Therefore, the Bernstein bound \(\varepsilon_{B}\) derived from the actual data stream variance will always be greater than \(\left(\varepsilon_{B}\right)_{min}\). Consequently, when concept drift occurs, the mean \(p\) will satisfy \(p<p_{max}-\epsilon_{B}\) and will not satisfy Equation (7). This ensures that the collected samples are not from the concept drift period, thereby guaranteeing that our sample collection phase is within the data stream's stable phase as determined by the Bernstein test. The schematic diagram of this process is shown in Figure 3.  
**Discussion--**Conditions for variance sample collection are set to obtain each data stream's variance in its stable state, which helps characterize the data stream's features. If conditions are not set for variance collection, then when drift occurs, the mean value of the sliding window must fluctuate greatly, so collecting data at risk of drift as a basis for variance estimation is unreliable. No matter which data stream is used, as long as concept drift occurs, the value of the window instance will fluctuate significantly. **Phase 2. ** Rapid variance estimation  
According to the description of Phase 1, it can be seen that the sample collection behavior of the variance estimation strategy is carried out in a relatively stable stage considered by the Bernstein test. Therefore, we believe that the variance of the collected samples can be expressed as the variance of the data stream in the stable stage. Assuming that the samples collected in Phase 1 are \(Y_{1}\),..., \(Y_{m}\), the stable state variance of the data stream can be estimated as Equation (8). \[\sigma^{2}\ =\ \frac{1}{m}\sum_{i=1}^{m}\left(1-\frac{1}{m}\sum_{j=1}^{m}Y_{ j}\right)^{2} \tag{8}\]  
Note that the samples in the stable state obey the binomial distribution, so we optimized the variance calculation into a cumulative form, as shown in Equation (9). \[\sigma^{2}\ =\ \frac{1}{m+1}\left(N_{1}\cdot\left(1-\frac{N_{1}}{m}\right)^{2 }+\left(m-N_{1}\right)\cdot\left(\frac{N_{1}}{m}\right)^{2}\right) \tag{9}\]  
Among them, \(N_{1}\) is the number of correct predictions in the sample, and \(N_{1}\) can be obtained through cumulative calculation. Therefore, every time the window is slid, the latest estimated variance value can be obtained by simply recording the predicted value of the new sample and accumulating it. No additional calculations are required, which improves work efficiency. Figure 4 illustrates the overall workflow of the variance estimation strategy. First, in the variance sampling phase (Phase 1), the current sliding window mean \(p\) and the historical maximum mean \(p_{max}\) are used. Then, the minimum Bernstein bound is applied to determine whether the current state is suitable for sampling. If it is, the latest instance in  
Figure 3: Variance sample collection process (Including the evaluation of variance sampling conditions and the sampling process). the window is added to the sample pool. The sample pool accumulates to yield \(N_{1}\). The estimated variance of the current data stream is then generated using the sample pool's capacity mm and the accumulated number of correct instances \(N_{1}\).