How to use the karateclub.graph_embedding.FGSD function in karateclub

To help you get started, we’ve selected a few karateclub examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github benedekrozemberczki / karateclub / examples.py View on Github external
#-----------------------------------

graphs = [nx.newman_watts_strogatz_graph(50, 5, 0.3) for _ in range(100)]

model = GL2Vec()

model.fit(graphs)
model.get_embedding()

#-----------------------------------
# FGSD example
#-----------------------------------

graphs = [nx.newman_watts_strogatz_graph(50, 5, 0.3) for _ in range(100)]

model = FGSD()

model.fit(graphs)
model.get_embedding()

#-----------------------------------
# NetMF example
#-----------------------------------

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

model = NetMF()

model.fit(g)
model.get_embedding()

#-----------------------------------
github benedekrozemberczki / karateclub / examples.py View on Github external
#-----------------

graphs = [nx.newman_watts_strogatz_graph(50, 5, 0.3) for _ in range(100)]

model = GL2Vec()

model.fit(graphs)
model.get_embedding()

#--------------
# FGSD example
#--------------

graphs = [nx.newman_watts_strogatz_graph(50, 5, 0.3) for _ in range(100)]

model = FGSD()

model.fit(graphs)
model.get_embedding()

#---------------
# NetMF example
#---------------

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

model = NetMF()

model.fit(g)
model.get_embedding()

#-------------------------