# Stream-DBSCAN: A Streaming Distributed Clustering Model for Water Quality Monitoring
## 2 Method Principle
### DBSCAN Algorithm  
The DBSCAN algorithm is a density-based clustering method that was first proposed by [PERSON] to address the challenge of irregularly shaped data sets and widely scattered clusters. This algorithm divides clusters based on the density of the data, which enables it to accurately restore the original data's shape characteristics. DBSCAN uses data density as the testing criterion to achieve continuity in clustering, resulting in a highly precise clustering effect with low time and space complexity. As a result, it has become the most famous density clustering algorithm [24]. The DBSCAN algorithm relies on two important parameters, Eps and MinPts, which will be adjusted to obtain the experimental results:  
Eps represents the radius around the data coordinate point and specify the coordinate point as the center of the circle, Within the radius of Eps, the points around the center point are counted to calculate the density attribute of the point. Eps, as a radius, often uses the L2 norm distance, also known as the Euclidean distance. Count the points around the center point within the radius of Eps to calculate the density attribute of the points. For example, point \(y\) belongs to the \(X\) dataset, where \(C_{\delta}(x)\) represents a subsample set containing samples \(X\) with a distance of no more than Eps from \(x\):  
\[C_{\delta}(x)=\{y\in X:\mathit{dist}(x,y)\leq\text{Eps}\} \tag{1}\]  
The parameter MinPts represents the minimum number of surrounding points, specifying the minimum number of neighbor points within the circle's radius of Eps. Using these two parameters, Eps and MinPts, the DBSCAN algorithm classifies data points into three categories:  
1. [label=(0)]
2. Core point: Taking the point k as the center and Eps as the radius, there exists \(\{x_{1},\,x_{2},\,\ldots,\,x_{n}\}\). If \(C_{\delta}(x)>\) MinPts, it means that the density attribute of point k meets the requirements, and the point k will be recorded as the core point of a certain cluster. In this sense, all points in the range of Eps from point k will be 'density reachable'. 2. Boundary point: Taking the point k as the center and Eps as the radius, there exists \(\{x_{1},x_{2},\ldots,x_{n}\}\). If \(C_{\delta}(x)<\) MinPts and point k is point reachable by the direct density of a point within the radius of Eps, point k will be a boundary point. 3. Noise point: Taking the point k as the center and Eps as the radius, there exists \(\{x_{1},x_{2},\ldots,x_{n}\}\). If \(C_{\delta}(x)<\) MinPts and there is no core point in the Eps range, point k will be recorded as the noise point. In the DBSCAN algorithm, reference density is transitive. If the density of \(K_{1}\) can reach \(K_{2}\) and the density of \(K_{2}\) can reach \(K_{3}\), then the densities of \(K_{1}\) and \(K_{3}\) are reachable. Similarly, if \(K_{2}\) and \(K_{3}\) make \(K_{1}\) density reachable, then \(K_{2}\) and \(K_{3}\) density are reachable. The DBSCAN algorithm connects the density-reachable points together to form clusters of clustering results. Compared with other clustering algorithms, the above-mentioned clustering mechanism of DBSCAN makes it unnecessary to preset the number of clusters and it can also exclude noise interference data through the density clustering process, which is part of reason why this paper chooses it as the core algorithm of the model. Density-based clustering algorithms are commonly utilized to address irregular data sets and relatively dispersed clusters. In contrast to the K-means algorithm, the DBSCAN algorithm does not require the initial number of clusters K to be set, nor does it rely on the distance between the centroid point and the decision point for clustering. Instead, it depends on the parameters Eps and MinPts to constrain the density around each point. The key advantage of the DBSCAN algorithm lies in its superior control. When processing water quality data, the granularity of water quality clustering can be controlled by adjusting the parameters of Eps and MinPts.