On 16.10.2017 07:54, Henrique Ferraz de Arruda wrote:
> 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']})
>
> ...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 -- Tiago de Paula Peixoto <[email protected]>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list [email protected] https://lists.skewed.de/mailman/listinfo/graph-tool
