stereo.core.StPipeline.louvain#
- StPipeline.louvain(neighbors_res_key='neighbors', res_key='louvain', resolution=None, random_state=0, flavor='vtraag', directed=True, use_weights=False)[source]#
Cluster cells into subgroups by Louvain algorithm [Blondel08].
- Parameters:
neighbors_res_key (
str
) – the key of neighbors to get corresponding result fromself.result
.res_key (
str
) – the key for storing result of Louvain clustering.resolution (
Optional
[float
]) – a parameter value to control the coarseness of clustering where higher value leads to more clusters.random_state (
int
) – change the initialization of the optimization.flavor (
Literal
['vtraag'
,'igraph'
,'rapids'
]) – choose among of packages for computing the clustering.'vtraag'
is much more powerful, and the default. Set toNone
if overridingpartition_type
to one that doesn’t accept aresolution_parameter
.directed (
bool
) – ifTrue
, treat the graph as directed. IfFalse
, undirected.use_weights (
bool
) – use weights from knn graph.
- Returns:
Clustering result of Louvain is stored in
self.result
where the key is'louvain'
.