marginal_multigraph_entropy

marginal_multigraph_entropy#

graph_tool.inference.marginal_multigraph_entropy(g, ecount)[source]#

Compute the entropy of the marginal latent multigraph distribution.

Parameters:
gGraph

Marginal multigraph.

ecountEdgePropertyMap

Vector-valued edge property map containing the counts of edge multiplicities.

Returns:
ehEdgePropertyMap

Marginal entropy of edge multiplicities.

Notes

The mean posterior marginal multiplicity distribution of a multi-edge \((i,j)\) is defined as

\[\pi_{ij}(w) = \sum_{\boldsymbol G}\delta_{w,G_{ij}}P(\boldsymbol G|\boldsymbol D)\]

where \(P(\boldsymbol G|\boldsymbol D)\) is the posterior probability of a multigraph \(\boldsymbol G\) given the data.

The corresponding entropy is therefore given (in nats) by

\[\mathcal{S}_{ij} = -\sum_w\pi_{ij}(w)\ln \pi_{ij}(w).\]