## 3 Macro SOStream Algorithm  
This section presents the Macro SOStream algorithm, an evolving algorithm for clustering data streams. Aiming to explain how the proposed algorithm works, Figure 2 shows the entire workflow performed by the Macro SOStream. Moreover, Figure 3 illustrates part of the algorithm processing, where the small spheres are microclusters, and dashed lines represent the macroclusters. This algorithm is based on the algorithm Self Organizing density-based clustering over data Stream - SOStream [15], which has only microclusters. However, the Macro SOStream has the function of creating arbitrary macroclusters online, as illustrated in Figure 3a, where the macroclusters are clusters of spherical microclusters. Macro SOStream has the same three input hyperparameters of the SOStream: the scale factor \(\alpha\), the minimum number of neighbors \(\eta\), and the fusion limit \(\gamma\). In addition to them, there is the new \(p\) hyperparameter, which is the decisive limit for whether or not \(v(t)\) belongs to the macrocluster. Here is used the notation \(\eta\) to represented the minimum number of neighbors, but \(MinPts\) is used in SOStream. After the first step of Figure 2, the hyper-parameterization, the algorithm receives the d-dimensional input vector, \(v(t)\) in time \(t\), where \(t=(1,2,3,\cdots,n)\), step 2. Initially, a macrocluster \(Macro_{j}\) with \(j=1\) is created, it will receive the first microclusters. The point \(v(t)\) will form the first \(\eta\) microclusters since \(\eta\) represents the minimum number of microclusters in the macrocluster. Consequently, the algorithm checks the number of microclusters in \(Macro_{j}\) as shown in step 3. Thus, in step 4, a set microcluster \(Micro(t)\) is created for each instant of time \(t\), where each microcluster has information about the number of points related to it \(n_{i}\), the radius \(r_{i}\), and the centroid \(C_{i}\). Consequently, each microcluster is represented by the tuple \(Micro_{i}=(n_{i},r_{i},C_{i})\), corresponding to \((1,0,v(t))\) at the start of a microcluster. This microcluster representation in tuples follows the same pattern present in SOStream. The macroclusters are represented by \(Macro_{j}=(n_{j},C_{j},micros_{j})\). The \(n_{j}\) is the number of microclusters, \(C_{j}\) is the centroid of the macrocluster, and \(micros_{j}\) is the list of microclusters. The Euclidean distance between \(v(t)\) and all the centroids of the microclusters present in \(Macro_{j}\) is calculated for every \(v(t)\) that arrives at the algorithm. Moreover, the winner microcluster \(Micro_{win}\) will be the one with the shortest distance from \(v(t)\), step 5. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithm** & **Learning** & **Merge** & \multicolumn{2}{c}{**Cluster**} \\  & & & **Micro** & **Macro** \\ \hline CluStream [11] & Offline \& Online & Yes & Spherical & Spherical \\ DenStream [12] & Offline \& Online & Yes & Spherical & Arbitrary \\ C-DenStream [13] & Offline \& Online & Yes & Spherical & Arbitrary \\ SDStream [14] & Offline \& Online & Yes & Spherical & Arbitrary \\ HDDStream [31] & Offline \& Online & Yes & Spherical & Arbitrary \\ PreDeConStream [18] & Offline \& Online & Yes & Spherical & Arbitrary \\ ACSC [34] & Offline \& Online & Yes & Spherical & Arbitrary \\ VHEC [33] & Offline \& Online & Yes & Elliptical & - \\ BEstream [20] & Offline \& Online & Yes & Elliptical & - \\ DGStream [22] & Offline \& Online & No & Grid & Arbitrary \\ TEDA [32] & Online & No & - & Arbitrary \\ OEC [16] & Online & No & - & Elliptical \\ SwarmStream [3] & Online & No & - & Arbitrary \\ Auto-Cloud [17] & Online & Yes & - & Spherical \\ SOStream [15] & Online & Yes & Spherical & - \\ HCMStream [19] & Online & Yes & Sphere/Cylinder & Arbitrary \\ DyClee [21] & Online & Yes & Hyperbox & Arbitrary \\ Macro SOStream & Online & Yes & Spherical & Arbitrary \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of evolving algorithms.