score_ah
接口定义
def score_ah(dimensions_per_block: int, anisotropic_quantization_threshold: float, training_sample_size: int, min_cluster_size: int, hash_type: string, training_iterations: int) -> scann.scann_ops.py.scann_builder.ScannBuilder
接口用途
添加PQ分区量化的相关参数(与开源算法接口保持一致)。
参数说明
参数名称  | 
数据类型  | 
描述  | 
取值范围  | 
|---|---|---|---|
dimensions_per_block  | 
int  | 
PQ量化合并维度数。  | 
[1, 数据维度]  | 
anisotropic_quantization_threshold  | 
float  | 
不对称分桶参数,仅对L2(squared_l2)数据集生效。  | 
[0, 1]  | 
training_sample_size  | 
int  | 
PQ分区训练时底库抽样个数。  | 
[0, 底库数量]  | 
min_cluster_size  | 
int  | 
最小PQ分区包含的底库向量个数。  | 
[0, 底库数量]  | 
hash_type  | 
字符串  | 
PQ量化类型。  | 
“lut16”或“lut256”。  | 
training_iterations  | 
int  | 
训练循环次数。  | 
大于等于1。  | 
返回值
数据类型  | 
说明  | 
|---|---|
scann.scann_ops.py.scann_builder.ScannBuilder  | 
ScannBuilder类用于接收构建参数。  | 
父主题: Python接口