# Stream-DBSCAN: A Streaming Distributed Clustering Model for Water Quality Monitoring
## 4 Experiment and Analysis
### Clustering Results  
After conducting a staged test with DBSCAN parameters Eps set to 0.05 (L2 norm) and Minpts set to 20, the clustering results are convenient for subsequent analysis. Table 3 displays the clustering results when the distributed node numbers are set to 3. A total of 5 clusters are classified, where clusters I-IV are small data clusters, and cluster V is a large data cluster. Meanwhile, 32,159 water quality indicators have not generated clusters as they are considered noise points by the system.  
In general, the results indicate that cluster v is relatively stable, as the three indicators are close to the data mode. Cluster v accounts for 81.8% of the total monitoring time, representing the normal water quality situation of the reservoir during May to August.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Index** & **Totle** & **S.D.** & **Avg** & **Min** & **Max** \\ \hline PH & 200,000 & 0.365684062 & 8.4248135 & 0 & 10.68473 \\ NH\({}_{4}\)N & 200,000 & 44.60782894 & 3.2476836 & 0 & 1000.000 \\ Turbidity & 200,000 & 92.26919696 & 39.706503 & 0 & 1000.000 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Dataset characteristics.  
Figure 5: Changes in each indicator. (**a**) \(\mathrm{pH}\); (**b**) NH\({}_{4}\)N; (**c**) turbidity.  
On the other hand, clusters I-IV have a smaller amount of data but larger 3D data values, with secondary peak values indicating a significant change in water quality during a certain period of time. The noise point values cannot form clusters as they fail to meet the density requirement due to their large change rate. These points correspond to several main peak values and nearby points in the line graph. Further analysis reveals that NH4N and turbidity noise points were far higher than the average value, indicating severe water quality pollution in the reservoir during those time periods.  
The changes in pH, NH4N, and turbidity, with noise points excluded, are depicted in Figure 6. Clustering was performed using DBSCAN, resulting in a reduction in the variation range of the three-dimensional water quality numerical curves, particularly for turbidity (Figure 5c). A significant number of extreme points in Figure 4c were classified as noise points, providing evidence that the Stream-DBSCAN model has achieved a satisfactory noise reduction effect.  
Figure 7 depicts a comparison of the 200,000 data sets before and after the noise reduction process in the form of a three-dimensional chart. The coordinate interval of NH4N and turbidity in Figure 7a ranges from 0 to 1000, and some sparsely distributed points can be observed. In Figure 7b, the pH coordinate interval ranges from 6 to 9, the NH4N coordinate interval ranges from 0 to 4, and the turbidity interval ranges from 0 to 6. The clustering process effectively removed the sparse points in Figure 7a as noise points through the clustering algorithm, while the points in Figure 7b maintain the characteristics of high-density clustering and the relative distances between clusters are maintained.  
We conducted a similar analysis on the results processed by the DBSCAN-Stream model, and the findings are presented in Table 4. The eigenvalues of the water quality data have undergone changes, with the model identifying most of the special peaks through noise reduction. These peaks represent instances of sensor interference or sudden pollution of water quality, which have significant practical implications.  
Figure 6: Changes of each index after noise reduction. (**a**) pH; (**b**) NH4N; (**c**) turbidity.