Question about how to deal with weighted networks in SBM

Dear all,
I have been using the lasted version of graph-tools, compiled from master
and I'm not having much success with using weighted networks on the method
"minimize_nested_blockmodel_dl"

I'm passing the weights as the "recs" argument. The code executes the
entire task, but when I visualize the communities doesn't seem to be
correctly assigned. I would appreciate if someone could, please, show an
example of use, or take a look at my code, as follow:

...

gtGraph = gt.Graph(directed=True)
gtGraph.add_edge_list(edges)

#load the weight
prop = gtGraph.new_edge_property("double")

for i,e in enumerate(edges):
    prop[gtGraph.edge(e[0],e[1])] = w[i]

state = gt.minimize_nested_blockmodel_dl(gtGraph,
state_args={"recs":[prop], "rec_types":['real-normal']})

...

Tank you.

Best regards.

Henrique.

attachment.html (1.04 KB)

I don't see anything wrong with the above. If you want a complete example of
use, look at the documentation:

https://graph-tool.skewed.de/static/doc/demos/inference/inference.html#edge-weights-and-covariates

It is difficult to say anything more concrete without a complete and
self-contained example, and an explanation of what you mean by communities
not being "correctly assigned".

Best,
Tiago