Problem with clabel
Bug reports:
Please follow the general troubleshooting steps first:
-
Are you running the latest graph-tool
version? -
Do you observe the problem with the current git version? -
Are you using Macports or Homebrew? No -
Did you compile graph-tool
manually? No
I am using SBMtopicmodeling to inference partition on bipartite networks
Using the current graph-tool (2.40) I noticed that there is a problem with state_args in minimize_nested_blockmodel_dl
steps to reproduce: given a trivial bi-partite network (graph.xml.gz), with VertexProperty kind that imposes the bi-partition
g = gt.load_graph("graph.xml.gz")
state_args = {}
state = gt.minimize_nested_blockmodel_dl(g, state_args=state_args)
finds partitions
but when I impose bi-partition
g = gt.load_graph("graph.xml.gz")
clabel = g.vp['kind']
state_args = {'clabel': clabel, 'pclabel': clabel}
state = gt.minimize_nested_blockmodel_dl(g, state_args=state_args)
it fails to find any partition.
The state is:
<NestedBlockState object, with base <BlockState object with 154 blocks (1 nonempty), degree-corrected, for graph <Graph object, undirected, with 154 vertices and 2065 edges, 2 internal vertex properties, 1 internal edge property, at 0x7f0264e46f50>, at 0x7f0264e46a10>, and 9 levels of sizes [(154, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)]
with contains only trivial layers
System: Python 3.7.10 OS: Ubuntu 18.04.5 LTS graph-tool: 2.40 (commit 3994a2ef, Thu Jun 24 15:23:22 2021 +0200)