Cluster assignments sometimes differ in two DBSCAN implementations

I implemented the DBSCAN algorithm in R, and I map the cluster assignments to the DBSCAN fpc library implementation . Testing is performed on synthetic data that is generated, as indicated in the dbscan example of the fpc library:

n <- 600
x <- cbind(runif(10, 0, 10)+rnorm(n, sd=0.2), runif(10, 0, 10)+rnorm(n, sd=0.3))

Clustering is performed with parameters as shown below:

eps = 0.2
MinPts = 5

I map cluster assignments fpc::dbscanto my implementation dbscan. The maximum number of runs shows that each point was classified equally by both implementations.

But there are cases when 1 or 2 points and some rare times 5 or 6 points are assigned to different clusters in my implementation than in the fpc implementation. I noticed that only the classification of border points is different. After plotting the graph, I saw that the points whose cluster membership does not coincide in the implementations are in such a position that it can be assigned to any of its surrounding clusters, depending on which point of the cluster seed it was found first.

I am showing an image with 150 points (to avoid clutter) where 1 point classification is different. Please note that the cluster number of difference points is always greater in my implementation than the fpc implementation.

Cluster graph.

The top insert is fpc :: dbscan, the bottom insert is my dbscan implementation

Plot of clusters.  Top inset is fpc :: dbscan, bottom inset is my dbscan implementation

. , , (!) :


dbscan

+

o -

-

!

my dbscan implementation


fpc:: dbscan

- - - enter image description here


:

dbscan

enter image description here


fpc:: dbscan

enter image description here


x-y

-

, , , fpc . . :

fpc:: dbscan ( ), ,

enter image description here

dbscan ( + ), ,

enter image description here

  • , : ?

  • , fpc::dbscan . ( !) . , , fpc::dbscan , . , ?

.

+5
1

, DBSCAN . , . , .

DBSCAN " , ".

( !), . .

, , fpc ( O(n log n)), , , . '' ': , , ' ''.

""

  • () ( DDSCAN IIRC)
  • (fbc::dbscan, , )

, , . , . , .

: "" fbc::dbscan . , , .

- ?

+5

All Articles