runLeiden | R Documentation |
Implements the Leiden clustering algorithm in R using reticulate to run the Python version. Requires the python "leidenalg" and "igraph" modules to be installed. Returns a vector of partition indices.
runLeiden( SNN = matrix(), resolution = 1, partition_type = c("RBConfigurationVertexPartition", "ModularityVertexPartition", "RBERVertexPartition", "CPMVertexPartition", "MutableVertexPartition", "SignificanceVertexPartition", "SurpriseVertexPartition"), seed.use = 42L, n.iter = 10L, initial.membership = NULL, weights = NULL, node.sizes = NULL )
SNN |
An adjacency matrix compatible with |
resolution |
A parameter controlling the coarseness of the clusters |
partition_type |
Type of partition to use. Defaults to RBConfigurationVertexPartition. Options include: ModularityVertexPartition, RBERVertexPartition, CPMVertexPartition, MutableVertexPartition, SignificanceVertexPartition, SurpriseVertexPartition (see the Leiden python module documentation for more details) |
seed.use |
set seed |
n.iter |
number of iteration |
initial.membership |
arameters to pass to the Python leidenalg function defaults initial_membership=None |
weights |
defaults weights=None |
node.sizes |
Parameters to pass to the Python leidenalg function |
A parition of clusters as a vector of integers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.