Greetings,
I wish to obtain the out-degree and out-strength of a node in an aggregate network, but have been unable to do so with the available functions.
I first created a multilayer network with three layers, and then subsequently created the aggregate network.
mnet = pymnet.MultilayerNetwork(aspects=1, directed=False, fullyInterconnected=False)
# Add individual layers to the multiplex network
mnet.add_layer("layer1")
mnet.add_layer("layer2")
mnet.add_layer("layer3")
...
...
AN = pymnet.aggregate(mnet, 1)
Using list(AN) and list(AN.edges), I was able to verify that the appropriate nodes and edges exist in the aggregate network.
I have been able to obtain the aggregated weight for an edge in the aggregate network using AN[source, target], but I have not been able to get further information such as the degree of a node.
In the following code, I was able to get the node label as output, and also the degree distribution. But with the exception of these two, the others output 0.
for element in AN:
node = pymnet.net.MultilayerNode(element, AN, layers)
print('node:', element)
print('degree', node.deg())
print('outdegree', node.deg_out())
print('outstrength', node.strength_out())
print('degree distribution', pymnet.degs(AN))
I found a few private functions within the MultilayerNetwork class, but the functions I tried below were also giving the output as 0.
print(AN._get_degree_out('DK'))
print(AN._get_strength_out('DK'))
print(AN._get_link(list(AN.edges)[0]))
I seek your guidance on the appropriate method to identify the characteristics of a node in an aggregate network.
Thank you
Greetings,
I wish to obtain the out-degree and out-strength of a node in an aggregate network, but have been unable to do so with the available functions.
I first created a multilayer network with three layers, and then subsequently created the aggregate network.
Using
list(AN)andlist(AN.edges), I was able to verify that the appropriate nodes and edges exist in the aggregate network.I have been able to obtain the aggregated weight for an edge in the aggregate network using
AN[source, target], but I have not been able to get further information such as the degree of a node.In the following code, I was able to get the node label as output, and also the degree distribution. But with the exception of these two, the others output 0.
I found a few private functions within the
MultilayerNetworkclass, but the functions I tried below were also giving the output as 0.I seek your guidance on the appropriate method to identify the characteristics of a node in an aggregate network.
Thank you