Class wrapper based on scanpy
to use the Leiden algorithm to directly cluster your data matrix with a scikit-learn
flavor.
Developed using:
scanpy
v1.7.2sklearn
v0.23.2umap
v0.4.6numpy
v1.19.2leidenalg
pip install leiden_clustering
git clone https://github.com/MiqG/leiden_clustering.git
cd leiden_clustering
pip install -e .
from leiden_clustering import LeidenClustering
import numpy as np
X = np.random.randn(100,10)
clustering = LeidenClustering()
clustering.fit(X)
clustering.labels_
leiden_clsutering
is distributed under a BSD 3-Clause License (see LICENSE).
- Traag, V.A., Waltman, L. & van Eck, N.J. From Louvain to Leiden: guaranteeing well-connected communities. Sci Rep 9, 5233 (2019). DOI: https://doi.org/10.1038/s41598-019-41695-z