pub fn normalized_entropy<T>(data: &[T], n_bins: u8) -> Option<f64>Expand description
Computes the normalized Shannon entropy of a numeric data series.
This estimates the entropy of a continuous data series which tells you the the upper limit on the information content of the data.
0.0indicates no uncertainty (all data in one bin),1.0indicates maximal uncertainty (uniform distribution).
The higher the entropy the more information it may carry, and the lower the entropy the less information it may carry.
ยงExamples
use quant_mathema::stats::normalized_entropy;
let data = [1.0, 2.0, 2.0, 3.0, 4.0, 5.0, 1.0, 4.0, 3.0, 2.0];
let entropy = normalized_entropy(&data, 5);
assert!(entropy.unwrap() > 0.5 && entropy.unwrap() < 1.0);