I am interested in investigating spatial clustering in a certain dataset. Spatial clustering is a technique used in data analysis to group together objects or data points based on their proximity in space. In spatial clustering, the goal is to identify groups of objects that are close to each other in physical space and have similar characteristics. The clusters must be contiguous, meaning that the objects within each cluster must be physically connected to each other (by an edge or a vertex, for instance).
Without investigating carefully, the first method that came to my mind was DBSCAN, since DBSCAN works by defining a neighborhood around each data point, and then identifying points that are close together based on a distance metric. It then builds clusters by connecting nearby points that have a sufficiently high density of neighboring points. Points that are not part of any cluster are classified as noise.
However, when I look at python it seems that there is no explicit way to input the desired contiguous condition (ie, to be connected by an edge or by a vertex). I expected that I was able to input the "neighborhood" matrix and DBSCAN would only find elements of the same cluster if the contiguity conditions was valid.
On the other hand, when I look at other methods, such as Agglomerative Clustering or feature agglomeration, I find this input connectivity.
Am i missing something? Are there other methods that run spatial clustering with a pre-defined connectivity matrix?