Prepare parameters setup for Louvain clustering.

model_set_Louvain(
  algorithm = 1,
  method = "matrix",
  n.start = 10,
  n.iter = 10,
  seed = 1,
  group.singletons = TRUE
)

Arguments

algorithm

Algorithm for modularity optimization (1 = original Louvain algorithm; 2 = Louvain algorithm with multilevel refinement; 3 = SLM algorithm; 4 = Leiden algorithm). Leiden requires the leidenalg python.

method

Method for running leiden (defaults to matrix which is fast for small datasets). Enable method = "igraph" to avoid casting large data to a dense matrix.

n.start

Number of random starts.

n.iter

Maximal number of iterations per random start.

seed

Seed of the random number generator.

group.singletons

Group singletons into nearest cluster. If FALSE, assign all singletons to a "singleton" group.

Examples

model_set_Louvain(n.start=5)
#> $algorithm
#> [1] 1
#> 
#> $method
#> [1] "matrix"
#> 
#> $n.start
#> [1] 5
#> 
#> $n.iter
#> [1] 10
#> 
#> $seed
#> [1] 1
#> 
#> $group.singletons
#> [1] TRUE
#>