## 4 Experimental Design
### Algorithm Comparison Experiments
\begin{table}
\begin{tabular}{l l c c c c c c c c} \hline \hline \hline \multicolumn{1}{c}{\multirow{2}{*}{**Data Stream**}} & \multicolumn{8}{c}{**Algorithm**} \\ \cline{3-10}  & & **LB** & **OAUE** & **ARF** & **BOLE** & **MUOB** & **MOOB** & **CALMID** & **HSDW-MI** \\ \hline \multirow{4}{*}{Stationary data stream} & ImbSta\_Stream & 94.61(3) & 91.24(6) & 96.45(2) & 93.21(5) & 76.19(8) & 89.82(7) & 93.94(4) & **96.72(1)** \\  & ImbSta\_Extreme\_Stream & 92.91(4) & 90.08(6) & 94.40(2) & 90.98(5) & 64.42(8) & 86.69(7) & 94.40(2) & **95.58(1)** \\ \cline{1-1}  & ImbSta\_SG & 86.58(5) & 86.60(4) & 91.71(2) & 83.49(6) & 71.21(8) & 82.29(7) & 90.55(3) & **92.28(1)** \\ \cline{1-1}  & ImbSta\_Extreme\_SG & 86.37(4) & 8 macro-Recall, and 1.35% higher G-mean values. The second-ranked algorithm is the state-of-the-art CALMID, which effectively handles differences between majority and minority classes using the asymmetric margin threshold matrix and uncertainty strategy. CALMID also proposed a composite sample weight formula that assigns higher training weights to newly arrived and minority samples, accommodating data stream imbalance and concept drift. The ARF algorithm ranks third, even though it lacks a mechanism to handle class imbalance. However, ARF requires significant time to maintain the detector and training tree. LB, OAUE, and BOLE algorithms perform poorly on extremely imbalanced data streams but achieve better results on other streams. The MOOB algorithm, with resampling and time decay techniques, performs better only on data streams without concept drift, as it lacks a mechanism to handle such drift. MUOB cannot adapt to complex data streams because under-sampling results in substantial sample information loss. Overall, HSDW-MI achieves the best macro-Recall and G-mean values, ranking first and demonstrating its effectiveness in identifying minority class instances, especially in extremely imbalanced data streams. As shown in Tables 7 and 8, HSDW-MI attains better macro-Precision and macro-F1-score values only on stationary data streams, while it is slightly outperformed by the ARF and CALMID on variable data streams. This is because both macro-Precision and macro-F1-score metrics focus more on majority class classification. In HSDW-MI, the class ratio-based sampling approach calculates too many majority class samples requiring under-sampling, which somewhat impairs the learnability of majority class samples. For real data streams, HSDW-MI achieves the best results for macro-Recall and G-mean values. On the PokerHand dataset, LB ranks first in macro-Precision and macro-F1-score, while HSDW-MI has lower performance than other algorithms. It is worth noting that most algorithms display 0 in G-mean, macro-Precision, and macro-F1-score. It is due to the fact that the real data stream contains a large number of classes, and the number of minority class instances may be single-digit, resulting in 0 values for macro-Precision, macro-F1-score, and G-mean. This also demonstrates that HSDW-MI can handle the severe lack of minority class samples and adapt to extremely imbalanced data streams. To better illustrate each algorithm's performance on data streams, we present the run results of all algorithms on ImbSta_Extreme_SG, ImbSta_Extreme_SIG, ImbVar_Extreme_SG, and ImbVar_Extreme_SIG data streams in the form of line graphs, as shown in Figures 5 and 6. As shown in Figure 5a,b, the best performance in the stationary data streams is the HSDW-MI algorithm, followed by the CALMID and ARF algorithms. The CALMID and ARF algorithms also show better performance when no concept drift occurs, even close to that of HSDW-MI. In the stage after the first drift in Figure 5a, the HSDW-MI algorithm's performance is slightly lower than the other algorithms, but HSDW-MI is able to recover from the drift faster and its overall performance is still the best.