How to use the karateclub.dataset.GraphSetReader 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
#---------------
# NetMF example
#---------------

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

model = NetMF()

model.fit(g)
model.get_embedding()

#-------------------------
# GraphSet reader example
#-------------------------

reader = GraphSetReader("reddit10k")

graphs = reader.get_graphs()
y = reader.get_target()

#----------------------
# Graph reader example
#----------------------

reader = GraphReader("facebook")

graph = reader.get_graph()
target = reader.get_target()

#-------------------------------
# Graph2Vec attributed example
#-------------------------------
github benedekrozemberczki / karateclub / examples.py View on Github external
#-----------------------------------
# NetMF example
#-----------------------------------

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

model = NetMF()

model.fit(g)
model.get_embedding()

#-----------------------------------
# GraphSet reader example
#-----------------------------------

reader = GraphSetReader("reddit10k")

graphs = reader.get_graphs()
y = reader.get_target()
#-----------------------------------
# Graph reader example
#-----------------------------------

reader = GraphReader("facebook")

graphs = reader.get_graph()
target = reader.get_target()

#-----------------------------------
# Graph2Vec example
#-----------------------------------