pub fn cross_entropy(p: &[f64], q: &[f64]) -> f64
The cross entropy -Σ p log2 q in bits. Infinite if q is zero where p is positive. Returns NaN if the slices differ in length or contain negative values.
-Σ p log2 q
q
p
NaN