Replies: 1 comment 2 replies
-
Hi! Yes, you can do that using im = Infomap(silent=True, two_level=True)
# read graph somehow
# im.add_networkx_graph(G)
# or
# im.read_file("network.net")
# or add nodes and links manually
C1 = {
# node: module
1: 0,
2: 0,
3: 1,
4: 1,
# ...
}
im.initial_partition = C1
im.run(no_infomap=True)
print(im.relative_codelength_savings) You can also pass the initial partition to Hope this helps! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a graph G and a clustering C1 on the graph G
I calculated with Infomap the clustering C2 on the graph G
with im.codelength I know the codelength of the graph G
with im.relative_codelength_savings I know the relative-codelength-savings for C2
I want to know the relative-codelength-savings for C1
Does anyone know how to do it?
THANKS
Beta Was this translation helpful? Give feedback.
All reactions