edge weights vs multi-graphs in minimize_blockmodel_dl

classic Classic list List threaded Threaded
5 messages Options
sam
Reply | Threaded
Open this post in threaded view
|

edge weights vs multi-graphs in minimize_blockmodel_dl

sam
How does minimize_blockmodel_dl deal with multi-graphs (graphs where multiple
edges can exist between two vertices)?

Is the information discarded, or is it incorporated as edge weight, and if
so, how?

Sorry if this is addressed in the documentation.



--
Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: edge weights vs multi-graphs in minimize_blockmodel_dl

Tiago Peixoto
Administrator
Am 21.05.20 um 22:25 schrieb sam:
> How does minimize_blockmodel_dl deal with multi-graphs (graphs where multiple
> edges can exist between two vertices)?
>
> Is the information discarded, or is it incorporated as edge weight, and if
> so, how?

If there are parallel edges in the graph, they are taken into account,
since the underlying SBM accepts multigraphs. This is done
automatically, and there is nothing special that needs to be done.


--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
sam
Reply | Threaded
Open this post in threaded view
|

Re: edge weights vs multi-graphs in minimize_blockmodel_dl

sam
Thanks.

Could you clarify the difference between

(1) loading a graph with parallel edges g and running
minimize_blockmodel_dl(g) on it

(2) loading a graph with simple edges but an edge property equal to the
number of parallel edges and running:
state_args=dict(recs=[g.ep.weight], rec_types=["discrete-poisson"]))

Sorry if this question is obvious; I've read your "Nonparametric weighted
stochastic block models", "Efficient Monte Carlo and greedy heuristic for
the inference of stochastic block models", and "Nonparametric Bayesian
inference of the microcanonical stochastic block model" papers. I am just
not 100% clear on the mapping from the papers to what the function does, in
this case. I am getting some quite different results depending on whether I
use method (1) or (2), but that may be due to randomness.



--
Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: edge weights vs multi-graphs in minimize_blockmodel_dl

Tiago Peixoto
Administrator
Am 22.05.20 um 07:33 schrieb sam:

> Thanks.
>
> Could you clarify the difference between
>
> (1) loading a graph with parallel edges g and running
> minimize_blockmodel_dl(g) on it
>
> (2) loading a graph with simple edges but an edge property equal to the
> number of parallel edges and running:
> state_args=dict(recs=[g.ep.weight], rec_types=["discrete-poisson"]))
The first is the regular degree-corrected Poisson SBM. The second is a
version with edge covariates, where we first sample from the Poisson
SBM, and then we sample weights on edges according to a specific
distribution (in your case, again a Poisson). This is not equivalent to
sampling from a single Poisson, since the 'weight' Poisson covariates
are sampled only on the non-zero entries of the first Poisson. So, for
example, we may have a sparse graph, with most pairs of nodes not being
connected, but where every edge has an integer covariate that is very
high, say on the order of 100, which would not be possible to generate
with model 1 without the whole graph becoming dense.

Best,
Tiago

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
sam
Reply | Threaded
Open this post in threaded view
|

Re: edge weights vs multi-graphs in minimize_blockmodel_dl

sam
thanks, that's a great explanation and helps explain the difference in
results. thanks for building this excellent package!



--
Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool