# Community detection questions

Hi!I'm trying to perform community detection algorithm with /nested
stochastic block model/ and I had some questions:
Is there a way to take into account the weights of the edges? I read in
*BlockState* about some /weights/, but did not understand what it is and how
to use them.
How to get the hierarchical results from the /nested stochastic block model/
to obtain a kind of agglomerative dendrogram?
How to obtain numerical values of each vertex belonging to the clusters,
after margins collectioning, like it drew in pie vertex chart in examples?
How to measure quality of partitioning: is it any other metrics, than was in
examples? Is it necessary that both/ Model Evidence/ was bigger and /Bethe
Entropy/ was lower? What if only one metrics performs better, then other
Thank you very much for your tremendous work on algorithms and only one
multi-threaded library for working with graphs! I hope my questions are not
too stupid and help someone else.

attachment.html (1.47 KB)

Hi! I'm trying to perform community detection algorithm with /nested
stochastic block model/ and I had some questions:

1. Is there a way to take into account the weights of the edges? I read in
*BlockState* about some /weights/, but did not understand what it is and
how to use them.

These are positive integer-valued property maps that should contain the edge
multiplicities between nodes.

2. How to get the hierarchical results from the /nested stochastic block
model/ to obtain a kind of agglomerative dendrogram?

Look at NestedBlockState.draw() and draw_hierarchy().

3. How to obtain numerical values of each vertex belonging to the clusters,
after margins collectioning, like it drew in pie vertex chart in examples?

They are stored in the property maps returned by collect_vertex_marginals().

4. How to measure quality of partitioning: is it any other metrics, than
was in examples? Is it necessary that both/Model Evidence/ was bigger
and /Bethe Entropy/ was lower? What if only one metrics performs better,