Skip to main content
. 2019 Dec 19;20(1):23. doi: 10.3390/s20010023
Input: sample data set DS, parameters (Eps, Minpts)
Output: data cluster set C
DBSCAN (DS, Eps, Minpts)
Begin
  1. Mark all points in DS as unvisited;

  2. Do

  3. Randomly choose an unvisited xi;

  4. Mark xi as visited;

  5. If points in xi’s Eps-neighborhood are no less than Minpts

  6.  Create a new data cluster (DC);

  7.  Set N consist of points in xi’s Eps-neighborhood;

  8.   For each point xj in N

  9.    If xj is unvisited

  10.     Mark xj as visited;

  11.     If points in xj’s Eps-neighborhood are no less than Minpts, add points to N;

  12.     End if

  13.     If xj is not a member of any data cluster, add xj to DC;

  14.     End if

  15.    End if

  16.   End for;

  17.   Output DC;

  18. Else mark xi as a noise point;

  19. End if

  20. Until all unvisited points are visited;

  21. Output C

End