Skip to main content

nmse

Function nmse 

Source
pub fn nmse(a: &[f32], b: &[f32]) -> f64
Expand description

Normalized mean-squared error.

NMSE = mse(a, b) / mse(a, 0). Returns the raw mse(a, b) when the reference is degenerate (all zeros) — falls back gracefully so tests for ops that legitimately output zero don’t divide by zero.

§Panics

Panics if a.len() != b.len().