-
Notifications
You must be signed in to change notification settings - Fork 0
Mathematical Framework
Raphael Constantinis edited this page Jul 23, 2025
·
2 revisions
This page details the mathematical foundations of entropic measurement, including the concepts of entropy, divergence, and uncertainty quantification. We provide clear definitions, key equations, and pseudocode for computation.
Definition:
Entropy is a quantitative measure of uncertainty in a probability distribution P. For a discrete random variable X with outcomes x₁, x₂, ..., xₙ and probability mass function P(x):
H(P) = -Σ₁ⁿ P(xᵢ) log P(xᵢ)
def entropy(probabilities): import math return -sum(p * math.log(p) for p in probabilities if p > 0)
Kullback-Leibler (KL) Divergence:
KL divergence quantifies how one probability distribution Q diverges from a reference distribution P:
D_KL(P || Q) = Σ₁ⁿ P(xᵢ) log[P(xᵢ)/Q(xᵢ)]
def kl_divergence(P, Q):
import math
return sum(p * math.log(p/q) for p, q in zip(P, Q) if p > 0 and q > 0)
-
Shannon Entropy:
H(P) = -Σ P(x) log P(x) -
KL Divergence:
D_KL(P || Q) = Σ P(x) log [P(x) / Q(x)] -
Jensen-Shannon Divergence:
JS(P, Q) = 1/2 D_KL(P || M) + 1/2 D_KL(Q || M)
whereM = 1/2 (P + Q)
- Shannon, C. E. (1948). A Mathematical Theory of Communication.
- Cover, T. M., & Thomas, J. A. (2006). Elements of Information Theory.