model.fit(g, x) quit() #------------------------------------ # BigClam example #------------------------------------ g = nx.newman_watts_strogatz_graph(100, 20, 0.05) model = BigClam() model.fit(g) membership = model.get_memberships() print(community.modularity(membership, g)) quit() #------------------------------------ # Walklets example #------------------------------------ g = nx.newman_watts_strogatz_graph(100, 20, 0.05) model = Walklets()
x = nx.adjacency_matrix(p) model = BANE() model.fit(g, x) #------------------------------------ # BigClam example #------------------------------------ g = nx.newman_watts_strogatz_graph(100, 20, 0.05) model = BigClam() model.fit(g) membership = model.get_memberships() #------------------------------------ # Walklets example #------------------------------------ g = nx.newman_watts_strogatz_graph(100, 20, 0.05) model = Walklets() model.fit(g) emb = model.get_embedding() #------------------------------------ # DeepWalk example