ask for help: multilayer network

15 views
Skip to first unread message

ridhi bhatt

unread,
Aug 1, 2022, 8:01:50 AMAug 1
to networkx-discuss
hello community
I am using uunet the library of multinet for community detection in multilayer network 
there is an error
import uunet.multinet as ml
import pandas as pd
def df(d):

       def empty_func():
           pass
ml.empty()
net=ml.empty()

ml.add_layers(net,["UL" ,"BL"])
ml.layers(net)
dir={"layer1":["UL"], "layer2":["BL"], "dir":[True]}
net = ml.empty()
ml.add_layers(net, ["UL", "BL"])
ml.layers(net)
dir = { "layer1": ["UL"], "layer2": ["BL"], "dir": [True] }
ml.set_directed(net, dir)
df( ml.is_directed(net) )
actors = ["A", "B", "C", "A", "B", "C"]
layers = ["UL", "UL", "UL", "BL", "BL", "BL"]
vertices = {"actor": actors, "layer": layers}
ml.add_vertices(net, vertices)
df( ml.vertices(net) )
from_actor = ["A", "A", "B", "A"]
from_layer = ["UL", "UL", "UL", "BL"]
to_actor = ["B", "C", "C", "C"]
to_layer = ["UL", "UL", "UL", "BL"]
edges = {"from_actor": from_actor, "from_layer": from_layer, "to_actor":
to_actor, "to_layer": to_layer}
ml.add_edges(net, edges)
df( ml.edges(net) )
df( ml.edges(net, layers1 = ["BL"]) )
l = ml.layout_multiforce(net, w_inter = [1000])
ml.plot(net, layout = l, vertex_labels_bbox = {"boxstyle":'round4', "fc":
'white'})

attribute error: {module 'uunet.multinet' has no attribute 'empty'}
how can it be corrected 
or suggest any other package for the simulation of multilayer network.


Reply all
Reply to author
Forward
0 new messages