locan.process.cluster.clustering.cluster_hdbscan¶
- locan.process.cluster.clustering.cluster_hdbscan(locdata, min_cluster_size=5, loc_properties=None, allow_single_cluster=False, **kwargs)[source]¶
Cluster localizations in locdata using the hdbscan clustering algorithm.
- Parameters:
locdata (
LocData) – Localization data on which to perform the manipulation.loc_properties (
list[str] |None) – The LocData properties to be used for clustering. If None, locdata.coordinates will be used.min_cluster_size (
int) – Minimumm cluster size in HDBSCAN algorithm (default: 5)allow_single_cluster (
bool) – If True, return single cluster (default: False)kwargs (
Any) – Other parameters passed to hdbscan.HDBSCAN.
- Returns:
A tuple with noise and cluster. The first LocData object is a selection of all localizations that are defined as noise, in other words all localizations that are not part of any cluster. The second LocData object is a LocData instance assembling all generated selections (i.e. localization cluster).
- Return type:
Note
In locdata 0.20.0 the original hdbscan implementation was replaced by the scikit-learn implementation. The new implementation should yield identical results if the min_samples parameter is increased by one. See notes at https://scikit-learn.org/stable/modules/generated/sklearn.cluster.HDBSCAN.html