microstate_entropy#
- graph_tool.inference.microstate_entropy(h, unlabel=True)[git][source]#
Compute microstate entropy given a histogram of partitions.
- Parameters:
- h
PartitionHist Partition histogram.
- unlabelbool (optional, default:
True) If
True, a canonical labelling of the groups will be used, so that each partition is uniquely represented. However, the entropy computed will still correspond to the full distribution over labelled partitions, where all \(B!\) permutations of the labels are assumed to be equally likely (\(\prod_lB_l!\) for hierarchical partitions).
- h
- Returns:
- H
float The microstate entropy value (in nats).
- H
See also
PartitionHistHistogram of partitions
bethe_entropyBethe entropy of the edge marginals
mf_entropyMean-field entropy of the vertex marginals
PartitionModeStateModes of a distribution of partitions
Notes
The microstate entropy is defined as,
\[H = - \sum_{\boldsymbol b}p({\boldsymbol b})\ln p({\boldsymbol b}),\]where \(p({\boldsymbol b})\) is the observed frequency of labelled partition \({\boldsymbol b}\).
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]