Skip to main content

normalization_ratio

Function normalization_ratio 

Source
pub fn normalization_ratio(data: &[f32], dims: usize) -> f64
Expand description

Check if embeddings are L2-normalized (suitable for spherical transform).

Returns the fraction of vectors whose L2 norm is within [0.99, 1.01].