mapequation / infomap

Multi-level network clustering based on the Map Equation
https://mapequation.org/infomap
GNU General Public License v3.0
425 stars 88 forks source link

Wrong codelength calculation with recorded teleportation if no optimization #327

Open danieledler opened 1 year ago

danieledler commented 1 year ago

Replicate in python:

edges = [
    [1,2],
    [2,3],
    [3,1],
    [3,4],
    [4,5],
    [5,6],
    [6,4],
]
G = nx.DiGraph()
G.add_edges_from(edges)
py.find_communities(G, recorded_teleportation=True, num_trials=1) # gives index codelength 0.102
py.find_communities(G, recorded_teleportation=True, num_trials=2) # gives index codelength 0.251