# [graph-tool] random_graph stochastic block model produces unreasonably interconnected blocks

G. B. geniusmastermind at gmail.com
Mon Oct 24 20:28:23 CEST 2016

```I'm currently building two-type random graphs of 100 vertices using the
traditional_blockmodel feature of the random_graph/random_rewire functions.
The degree_sampler I'm using is just lambda: poisson(5), which means that my
graphs have about 250 edges. My blocks contain 15 vertices and 85 vertices
respectively.

When I tune the correlation function in the following way:
def corr(a,b):
if a==b:
return 20
else:
return 1

I would expect, based on the documentation, that the following is
approximately true:
250 edges = (15*85)*(1*p_baseline) + (15 choose 2)*(20*p_baseline)+(85
choose 2)*(20*p_baseline). Solving this equation gives an approximate value
of p_baseline = .0033, given the degree_sampler I started with.

If p_baseline = .0033, then p_acrossblocks = .0033*1 = .0033 as well. Since
there are 85*15=1275 possible edges across the two blocks, I would expect an
average of .0033*1275=4.2 edges across the blocks in the entire network.

Despite this, I am continually seeing the minority block being, on average,
highly centralized in the overall network, with many more edges reaching
from it to the other block than would be predicted.

What has gone wrong here? Have I misunderstood the vertex_corr feature? Any
help would be greatly appreciated.

--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/random-graph-stochastic-block-model-produces-unreasonably-interconnected-blocks-tp4026797.html
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.

```