Hi there,
Layered overlapping models aren't working for GraphViews, due to the following problematic lines in LayeredBlockState:
if overlap and self.ec is not None: self.base_ec = self.base_g.own_property(ec.copy()) ec = agg_state.eindex.copy() pmap(ec, self.ec) <-- this line won't work as the GraphView inherits eindex self.ec = ec.copy("int")
Is there an easy fix? Minimum working example below:
import numpy.random as rand import graph_tool.all as gt
N = 20 L = 3 tg = gt.price_network(N) # generate random network size N elayer = tg.new_ep('int') E = len(tg.get_edges()) elayer.a = rand.randint(0,high=L,size=E) # randomly assign each edge to one of L layers tg.ep['elayer'] = elayer utg = gt.GraphView(tg,rand.choice([True,False],size=N)) # take random subsample of graph stest = gt.minimize_nested_blockmodel_dl(utg,layers=True,overlap=True
state_args=dict(ec=utg.ep.elayer,layers=True))
Thanks, John
-- Sent from: https://nabble.skewed.de/
Hi,
Thanks for the bug report and minimal working example.
Could you please open an issue in gitlab so this can be tracked and fixed?
The mailing list is not the best place for this.
Best, Tiago
Am 25.08.20 um 18:43 schrieb fitzgeraldj:
Hi there,
Layered overlapping models aren't working for GraphViews, due to the following problematic lines in LayeredBlockState:
if overlap and self.ec is not None: self.base_ec = self.base_g.own_property(ec.copy()) ec = agg_state.eindex.copy() pmap(ec, self.ec) <-- this line won't work as the GraphView inherits eindex self.ec = ec.copy("int")
Is there an easy fix? Minimum working example below:
import numpy.random as rand import graph_tool.all as gt
N = 20 L = 3 tg = gt.price_network(N) # generate random network size N elayer = tg.new_ep('int') E = len(tg.get_edges()) elayer.a = rand.randint(0,high=L,size=E) # randomly assign each edge to one of L layers tg.ep['elayer'] = elayer utg = gt.GraphView(tg,rand.choice([True,False],size=N)) # take random subsample of graph stest = gt.minimize_nested_blockmodel_dl(utg,layers=True,overlap=True
state_args=dict(ec=utg.ep.elayer,layers=True))
Thanks, John
-- Sent from: https://nabble.skewed.de/ _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool
Apologies, gitlab won't let me sign in with any account at the moment for some reason otherwise I would.
-- Sent from: https://nabble.skewed.de/
Am 26.08.20 um 10:49 schrieb fitzgeraldj:
Apologies, gitlab won't let me sign in with any account at the moment for some reason otherwise I would.
The system seems to have thought that your multiple accounts were spam... I have unblocked them.