The following code
library(igraph)
g <- make_ring(5)
set.seed(1)
cle <- cluster_leiden(g, resolution=1, objective_function=c("CPM", "modularity")[1])
modularity(g, membership(cle))
cle$quality
# print_all(g)
# print.default(cle)
returns:
> modularity(g, membership(cle))
[1] -0.2
> cle$quality
[1] -0.5
Question: what is / where can I find the meaning of the value $quality in the result object. It is not the modularity...
As pointed out by https://stackoverflow.com/users/695132/szabolcs the objective function equals:
(1/2m) (ΣAij - Σ γ.ni.nj), whenever i and j are in the same community.
In this example:
Giving (0 - 5) / 10 = -0.5.