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

Reply via email to