Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#-----------------------------------
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()
#-----------------------------------
# GraphSet reader example
#-----------------------------------
reader = GraphSetReader("reddit10k")
graphs = reader.get_graphs()
y = reader.get_target()
#-----------------------------------
# Graph reader example
#-----------------------------------
#------------------------------
g = nx.newman_watts_strogatz_graph(1000, 20, 0.05)
model = LaplacianEigenmaps()
model.fit(g)
embedding = model.get_embedding()
#--------------
# NEU example
#--------------
g = nx.newman_watts_strogatz_graph(1000, 20, 0.05)
model = NetMF()
meta_model = NEU()
meta_model.fit(g, model)
#-----------------------------------
# NetLSD example
#-----------------------------------
graphs = [nx.newman_watts_strogatz_graph(50, 5, 0.3) for _ in range(100)]
model = NetLSD()
model.fit(graphs)
model.get_embedding()
#--------------
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()
#-------------------------
# GraphSet reader example
#-------------------------
reader = GraphSetReader("reddit10k")
graphs = reader.get_graphs()
y = reader.get_target()
#----------------------
# Graph reader example
#----------------------