To add a bit of aide to Trebs statement, I think it important to realistically first define what the definition of a cluster is, sure, "dots closer together", thats rather vauge.
Take this sample set I generated, I know there's a cluster shape there, I created it.
However, programmatically identifying this "cluster" might be hard.
A human might deem that a large toroidal cluster, but your automated program is more likely going to decide it a series of smaller clusters in semi-close proximity.
Also, note that there are regions of super-high-density, which are in the context of the bigger picture, merely distractions
You'll need to consider this behaviour and possibly chain together clusters of similar density separated only by insignificant voids of lower density, depending on the specific application.
Whatever you develop, I would at least be interested in how it identifies the data in this set.
( I think looking into the technologies behind HDRI ToneMapping might be in order, because these work more-or-less on Light density, and there are "local" tonemaps and "global" tone maps, each yielding different results )