marginal_entropy_bytes

Function marginal_entropy_bytes 

Source
pub fn marginal_entropy_bytes(data: &[u8]) -> f64
Expand description

Compute marginal (Shannon) entropy H(X) = −Σ p(x) log₂ p(x) in bits/symbol.

This is the simple first-order entropy from the byte histogram, NOT the context-conditional entropy rate from a language model.