Implement SBM minimization with frozen vertices
Ni! This issue is intended to track work implementing vertex freezing during [h]SBM minimization, so that @count0 can see if I'm doing something stupid incompatible with the bigger picture.
(A link will be added to the relevant branch as soon as there is one.)
Approach
- Make it work with a wrapper function around
minimize[_nested]_blockmodel_dl()
. - User provides a
frozen_vertices
argument that will be translated tomcmc_args
andshrink_args
. - Returns a
[Nested]BlockState
that does not move frozen vertices and preserves the blocks [hierarchy] containing them.
I prefer frozen_vertices
to vertices
here, as it makes it easier for the user to grasp which blocks will be preserved. But I'd be fine with either.
Tasks
Make it work with blockmodels
-
In minimize.py
:min_B
andmax_B
produced byget_states()
should take into account frozen vertices. - This will be done in the wrapper, so as to keep changes to the existing code to a minimum.
- Alternatively, one may be expected to provide appropriate
b_min
eb_max
when calling. -
Implementing vertex_freezing for merge_sweep()
. - Unlike its buddy
mcmc_sweep()
,merge_sweep()
called inshrink()
has no notion of a list of block vertices (not) to be modified. - This will require changes to the existing code, including a new parameter
frozen_vertices
inshrink_args
. - Once this is done we can check if the later
mcmc_sweep
side of things inmcmc_equilibrate()
justworks®.
Make it work with nested blockmodels
- Nada; depends on the previous.