Community Detection, Label Propagation, Python, Networkx, Graph.
if v == random_list[0]] for i in range(0, len(random_neighbours)): random_list3 = [v for k,v in unique_labels.items() if k == random_neighbours[i]] random_labels.append(random_list3[0]) label = random.choice(random_labels) unique_labels[node] = label Next we define a Modularity function specific to