#[repr(C)]pub struct cuvsProductQuantizerParams {
pub pq_bits: u32,
pub pq_dim: u32,
pub use_subspaces: bool,
pub use_vq: bool,
pub vq_n_centers: u32,
pub kmeans_n_iters: u32,
pub pq_kmeans_type: cuvsKMeansType,
pub max_train_points_per_pq_code: u32,
pub max_train_points_per_vq_cluster: u32,
}Expand description
@defgroup preprocessing_c_pq C API for Product Quantizer @{ / /** @brief Product quantizer parameters.
Fields§
§pq_bits: u32The bit length of the vector element after compression by PQ.
Possible values: within [4, 16].
Hint: the smaller the ‘pq_bits’, the smaller the index size and the better the search performance, but the lower the recall.
pq_dim: u32The dimensionality of the vector after compression by PQ. When zero, an optimal value is selected using a heuristic.
TODO: at the moment dim must be a multiple pq_dim.
use_subspaces: boolWhether to use subspaces for product quantization (PQ). When true, one PQ codebook is used for each subspace. Otherwise, a single PQ codebook is used.
use_vq: boolWhether to use Vector Quantization (KMeans) before product quantization (PQ). When true, VQ is used before PQ. When false, only product quantization is used.
vq_n_centers: u32Vector Quantization (VQ) codebook size - number of “coarse cluster centers”. When zero, an optimal value is selected using a heuristic. When one, only product quantization is used.
kmeans_n_iters: u32The number of iterations searching for kmeans centers (both VQ & PQ phases).
pq_kmeans_type: cuvsKMeansTypeThe type of kmeans algorithm to use for PQ training.
max_train_points_per_pq_code: u32The max number of data points to use per PQ code during PQ codebook training. Using more data
points per PQ code may increase the quality of PQ codebook but may also increase the build
time. We will use pq_n_centers * max_train_points_per_pq_code training
points to train each PQ codebook.
max_train_points_per_vq_cluster: u32The max number of data points to use per VQ cluster.
Trait Implementations§
Source§impl Clone for cuvsProductQuantizerParams
impl Clone for cuvsProductQuantizerParams
Source§fn clone(&self) -> cuvsProductQuantizerParams
fn clone(&self) -> cuvsProductQuantizerParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more