graph_tool.inference.mf_entropy#

graph_tool.inference.mf_entropy(g, p)[source]#

Compute the “mean field” entropy given the vertex block membership marginals.

Parameters:
gGraph

The graph.

pVertexPropertyMap

Vertex property map with vector-type values, storing the accumulated block membership counts.

Returns:
Hmffloat

The “mean field” entropy value (in nats).

Notes

The “mean field” entropy is defined as,

\[H = - \sum_{i,r}\pi_i(r)\ln\pi_i(r),\]

where \(\pi_i(r)\) is the marginal probability that vertex \(i\) belongs to block \(r\).

References

[mezard-information-2009]

Marc Mézard, Andrea Montanari, “Information, Physics, and Computation”, Oxford Univ Press, 2009. DOI: 10.1093/acprof:oso/9780198570837.001.0001 [sci-hub, @tor]