stlearn.spatial.clustering.localization

stlearn.spatial.clustering.localization(adata: AnnData, use_label: str = 'leiden', eps: float = 20.0, min_samples: int = 1, copy: bool = False) AnnData | None[source]

Perform local cluster by using DBSCAN.

Parameters:
  • adata (AnnData) – Annotated data matrix.

  • use_label (str, default = "leiden") – Use label result of cluster method.

  • eps (float, default 20.0) – The maximum distance between two samples for one to be considered as in the neighborhood of the other. This is not a maximum bound on the distances of points within a cluster. This is the most important DBSCAN parameter to choose appropriately for your data set and distance function.

  • min_samples (int, default = 1) – The number of samples (or total weight) in a neighborhood for a point to be considered as a core point. This includes the point itself. Passed into DBSCAN’s min_samples parameter.

  • copy (bool, default = False) – Return a copy instead of writing to adata.

Return type:

Anndata