Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

For questions about how to compile, install or use the library, please use instead the web forum at https://forum.skewed.de/c/graph-tool.


(If unsure, use the forum first.)


IMPORTANT: When opening new issues, please choose the BUG template from the drop-down menu, and fill out the required information.

  • Tiago Peixoto
  • graph-toolgraph-tool
  • Issues
  • #325
Closed
Open
Issue created Aug 04, 2016 by Alexander Crowell@10amc_2

Error In state.copy with layered nested block model

I'm having some trouble adapting the example on edge covariates with nested block models. The example code runs fine for my graph in the non-nested case and the initial minimization runs in the nested case:

>>> state = gt.minimize_nested_blockmodel_dl(g2, deg_corr=False, layers=True, state_args=dict(ec=g2.ep.e_weight2, layers=False))
>>> state
<NestedBlockState object, with base \<LayeredBlockState object with 6 blocks, 164 edge covariates, for graph <Graph object, undirected, with 66 vertices and 2145 edges at 0x1114f8cd0>, at 0x12ae51a10>, and 2 levels of sizes [(66, 6), (6, 1)] at 0x129abcad0>

However the mcmc equilibration returns:

>>> gt.mcmc_equilibrate(state, wait=10000, nbreaks=4, mcmc_args=dict(niter=10),verbose=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/graph_tool/inference/mcmc.py", line 120, in mcmc_equilibrate
    delta, nmoves = state.mcmc_sweep(**mcmc_args)
  File "/usr/local/lib/python2.7/site-packages/graph_tool/inference/nested_blockmodel.py", line 538, in mcmc_sweep
    return self._h_sweep(lambda s, **a: s.mcmc_sweep(**a), c=c, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/graph_tool/inference/nested_blockmodel.py", line 462, in _h_sweep
    get_entropy_args(eargs))
  File "/usr/local/lib/python2.7/site-packages/graph_tool/inference/blockmodel.py", line 588, in _couple_state
    self._state.couple_state(state._state, entropy_args)
AttributeError: 'graph_tool::Layers<graph_tool::BlockState<boost::U' object has no attribute 'couple_state'

I thought this may have to do with the base_type = LayeredBlockState parameter specified in the docs, however minimize_nested_blockmodel_dl doesn't accept it as a kwarg so I'm not sure if this is a bug or me just failing to understand how to properly specify that the nested block state should inherit from the layered block state. Thanks very much!

Assignee
Assign to
Time tracking