mcmc = gt.collection.data['polbooks']
state = gt.BlockState(mcmc, B=3, deg_corr=True,)
pv = None
for i in range(1000): # remove part of the transient
ds, nmoves = gt.mcmc_sweep(state)
for i in range(1000):
ds, nmoves = gt.mcmc_sweep(state)
pv = gt.collect_vertex_marginals(state, pv)
gt.graph_draw(mcmc, pos=mcmc.vp['pos'], vertex_shape='pie', vertex_pie_fractions=pv, inline=True)
ArgumentError Traceback (most recent call last)
<ipython-input-40-aaa79be2effa> in <module>()
1 mcmc = gt.collection.data['polbooks']
----> 2 state = gt.BlockState(mcmc, B=3, deg_corr=True,)
3 pv = None
4 for i in range(1000): # remove part of the transient
5 ds, nmoves = gt.mcmc_sweep(state)
/home/osboxes/anaconda2/lib/python2.7/site-packages/graph_tool/community/blockmodel.pyc in __init__(self, g, eweight, vweight, b, B, clabel, deg_corr, max_BE, **kwargs)
146 self.b = g.new_vertex_property("int")
147 self.b.fa = b
--> 148 else:
149 self.b = b = g.own_property(b.copy(value_type="int"))
150 if B is None:
/home/osboxes/anaconda2/lib/python2.7/site-packages/graph_tool/community/blockmodel.pyc in get_block_graph(g, B, b, vcount, ecount)
45 global __test__
46 __test__ = test
---> 47
48 def _bm_test():
49 global __test__
/home/osboxes/anaconda2/lib/python2.7/site-packages/graph_tool/community/blockmodel.pyc in condensation_graph(g, prop, vweight, eweight, avprops, aeprops, self_loops)
2577 ... ds, nmoves = gt.mcmc_sweep(state)
2578 ... pv = gt.collect_vertex_marginals(state, pv)
-> 2579 >>> gt.mf_entropy(state, pv)
2580 20.117550557730116
2581 >>> gt.graph_draw(g, pos=g.vp["pos"], vertex_shape="pie", vertex_pie_fractions=pv, output="polbooks_blocks_soft_B4.pdf")
ArgumentError: Python argument types in
graph_tool.community.libgraph_tool_community.community_network(GraphInterface, GraphInterface, any, any, any, any, any, any, bool)
did not match C++ signature:
community_network(graph_tool::GraphInterface {lvalue}, graph_tool::GraphInterface {lvalue}, boost::any, boost::any, boost::any, boost::any, boost::any, boost::any, bool, bool)