Minimize Function
Closed this issue · 2 comments
I do not quite understand your implementation/wrap-around of graph-tools minimize_blockmodel_dl
in wsbm.minimize
function.
Graph tool does not expect the parameters you are providing, like B_min=1, B_max=30
. These should be provided in the dictionaries state_args
and multilevel_mcmc_args
. It also does not expect the parameter overlap
at all.
Also you provide an argument pure_w
, which does nothing. Why?
In its current state this implementation breaks!
A possible fix to the current implementation would be:
def minimize(graph: gt.Graph, distribution: str = "discrete-binomial", deg_corr: bool = False):
return gt.minimize_blockmodel_dl(
graph,
state_args=dict(deg_corr=deg_corr, recs=[s_gt.ep.orig_weight], rec_types=[distribution], overlap=overlap),
multilevel_mcmc_args=dict(B_min=1, B_max=30, niter=100, entropy_args=dict(adjacency=False, degree_dl=False))
)
Could you maybe elaborate on why you choose to do it this way and if it was intentional, why you provide these arguments, as this would be very helpful.
I'll check it and come back to you as soon as I have time
At the moment of this implementation graph-tool expected those parameters. Thanks for pointing out, that the function signature changed. Code will be updated accordingly.