Skip to main content

codebook

Function codebook 

Source
pub fn codebook(
    x: &[Vec32],
    k: usize,
    eps: f32,
) -> (Vec<Vec32>, Vec<usize>, f32)
Expand description

Codebook = k-means prototypes; assign each vector via the Sinkhorn plan (argmax over targets).