Increasing hierarchy depth of nested block state

Hi Tiago,

I had a quick question about the creation of nested block states in your
cookbook examples. In a number of cases you manually augment the number of
hierarchy levels to 10 (for example here
). Firstly, what is the consequence of not doing so? Secondly, is there a
special significance to using 10 or is this simply a value you have chosen
for convenience/what is the consequence of varying this value?



In principle, the depth should be unbounded, but in practice we need some
upper limit. The value should be chosen so that it accommodates the
posterior distribution, i.e. the number of groups at the top is one most the
vast majority of the time.

That makes sense, thank you. I take it setting it at too large a value thus
is not so much of a problem as the top x layers will then simply be layers
containing a single group, setting it too small would however be a problem
in preventing a sufficient hierarchy. What happens if we set no value? For
example by saying

state = gt.minimize_nested_blockmodel_dl(g)
state = state.copy(sampling=True)

instead of

state = gt.minimize_nested_blockmodel_dl(g)
state = state.copy(bs=bs, sampling=True)

Is there an impact on the results quality to be expected? Or is there a
performance penalty?



In this case the hierarchy depth will be limited by the current value in
state. This is probably not a good idea, as it might fluctuate to slightly
larger values in the posterior.

There is no performance penalty in increasing the hierarchy depth (within
reason), as the the time it takes to update a hierarchy level with very few
nodes/groups is negligible.