Exemplo n.º 1
0
"""DeepWalk illustrative example."""

import networkx as nx
from karateclub.node_embedding.neighbourhood import DeepWalk

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

model = DeepWalk()

model.fit(g)
Exemplo n.º 2
0
g = nx.newman_watts_strogatz_graph(100, 20, 0.05)

model = Walklets()

model.fit(g)

emb = model.get_embedding()

#-------------------
# DeepWalk example
#-------------------

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

model = DeepWalk()

model.fit(g)

#-------------------
# Splitter example
#-------------------

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

model = EgoNetSplitter(1.0)

model.fit(g)

#----------------
# Edmot example
Exemplo n.º 3
0
def deepWalk(population, neighbors, probability):
    g = nx.newman_watts_strogatz_graph(population, neighbors, probability)
    model = DeepWalk()
    model.fit(g)
    #print(model.get_embedding())
    return [model.get_embedding()]