bipartite minimize_nested_blockmodel_dl() error: cannot move vertex across clabel barriers

Hi Dr. Peixoto,

I am using graph-tool version 2.45 and I have two questions.

  1. I am trying to reproduce the script in the document
  2. g = gt.collection.data["celegansneural"]
state = gt.minimize_nested_blockmodel_dl(g, state_args=dict(overlap=True))

          and have the error:
           /usr/lib/python3/dist-packages/graph_tool/inference/blockmodel.py:390: UserWarning: unrecognized keyword arguments: ['overlap']
     warnings.warn("unrecognized keyword arguments: " +

          It seems the argument of "overlap" is removed.

        2. Regardless of the question1, I am trying to do a bipartite version stochastic block model and I define "clabel" to constraint labels on the vertices so that vertices with different label values will not be clustered in the same group. But I always have the error of "ValueError: cannot move vertex across clabel barriers". The below is the code:
         node_types = g.vp['kind']
         node_types.get_array()
Output: PropertyArray([1, 1, 1, ..., 2, 2, 2], dtype=int32)

        state = gt.minimize_nested_blockmodel_dl(
        g,
        state_args=dict(clabel=node_types,pclabel=node_types,deg_corr=True),
        multilevel_mcmc_args = dict(niter=niter,beta=beta))

Could you please help me with these questions? Thanks!

Best,
Siwei

attachment.html (6.18 KB)