microstate_entropy#
- graph_tool.inference.microstate_entropy(h, unlabel=True)[source]#
Compute microstate entropy given a histogram of partitions.
- Parameters:
- h
PartitionHist
(optional, default:None
) 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 permutations are assumed to be equally likely.
- h
- Returns:
- H
float
The microstate entropy value (in nats).
- H
Notes
The microstate entropy is defined as,
\[H = - \sum_{\boldsymbol b}p({\boldsymbol b})\ln p({\boldsymbol b}),\]where \(p({\boldsymbol b})\) is 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]