Algorithm 1 DBSCAN: Density-based spatial clustering of applications with noise |
Require:: amplitude of ; : minimum neighbor number requirement for a central point of a cluster; : neighborhood radius; |
Ensure: clustering result C
|
1: : mark all points in as unvisited points, : mark all points in as non-noise points, : mark all points in as the state of not adding any clusters, : initial number of cluster; |
2: Normalize
|
3: for each point p in
do
|
4: if
then
|
5: ; |
6: Calculate the Euclidean distance between this point and the other points and get a set of neighbors which have a distance of less than ; |
7: if
then
|
8: ; |
9: else
|
10: ; |
11: ; |
12: repeat
|
13: ; ; |
14: if
then
|
15: ; |
16: Calculate the Euclidean distance between this point and the other points and get a set of neighbors which have a distance of less than ; |
17: if
then
|
18: ; |
19: end if
|
20: end if
|
21: if
then
|
22:
|
23: end if
|
24: until k>num(N1) |
25: end if
|
26: end if
|
27: end for
|