Skip to main content

centroid

Function centroid 

Source
pub fn centroid(samples: &[Vec<f32>]) -> Option<Vec<f32>>
Available on non-target_family=wasm only.
Expand description

Normalizes the elementwise mean of unit-length embeddings. Returns None when the mean has no direction.