构造函数(有参构造)
接口定义
class KBest(K_features: int, R: int, L: int, A: int, graph_opt_iter:int, metric: string, init_builder_type: string, index_type: string, numa_enabled: bool, numa_nodes_number: int)
接口用途
初始化构建图检索。
参数说明
参数名称 |
描述 |
数据类型 |
取值范围 |
---|---|---|---|
K_features |
特征维度。 |
int |
[1,2999] |
R |
邻居节点数。 |
int |
[11,499] |
L |
构图时的候选节点列表大小。 |
int |
[11,1999] |
A |
构图剪枝时的角度阈值。 |
int |
[1,360] |
graph_opt_iter |
图索引自我迭代的轮数。 |
int |
[0,30] |
metric |
距离度量的方式。其中, |
字符串 |
“L2”或“IP”。
|
init_builder_type |
构建k近邻图的算法。 |
字符串 |
“RNNDescent”和“NNDescent”,表示两种不同的构建k近邻图的算法,常使用“RNNDescent”。 |
index_type |
选择邻居策略。 |
字符串 |
“HNSW”或“NSG”或“TSDG”或“SSG”,表示四种不同的选择邻居策略。 |
numa_enabled |
是否开启NUMA优化。 |
布尔值 |
- |
numa_nodes_number |
使用的NUMA节点数量。 |
int |
大于等于1。 |
父主题: Python