Example #1
0
def graphWave(population, neighbors, probability):
    g = nx.newman_watts_strogatz_graph(population, neighbors, probability)
    model = GraphWave()
    model.fit(g)
    embedding = model.get_embedding()

    #print(embedding)
    return [embedding]
Example #2
0
"""GraphWave illustrative example."""

import networkx as nx
from karateclub.node_embedding.structural import GraphWave

g = nx.newman_watts_strogatz_graph(100, 20, 0.05)

model = GraphWave()

model.fit(g)