0
$\begingroup$

I have two identical feature vectors. They have a distance score of 0.

I perform DBSCAN Clustering (using sci-kit) and they get different labels.

Is this expected behaviour?

$\endgroup$
0
$\begingroup$

In theory this could happen for border points, if and only if border point assignments are resolved with a random assignment. Which actually is more costly to do fair instead of a first-assignment-wins or last-assignment-wins strategy (and since the original DBSCAN did not do such a randomized assignment but first-assignment-wins, it is more appropriate to do it this way, too).

It could also be due to numerical precision. The two vectors have a distance score of 0, but for the nearest core point, one of them has distance > epsilon, and the other one < epsilon, due to numerical precision. But I couldn't even design a data set for this to happen on purpose, I doubt this happens on chance easily.

So this should be either a bug or an incorrect usage on your side.

Have you compared the results to the reference implementation of DBSCAN in ELKI? That seems to be somewhat the "official" version by now, and also appears to be carefully validated.

$\endgroup$
  • $\begingroup$ It turns out, I was calling fit() with the original features vector and not the distance matrix. Thats the source of my error, but your response answers my question. Thanks! $\endgroup$ – oliw Nov 24 '14 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.