鲲鹏社区首页
中文
注册
我要评分
文档获取效率
文档正确性
内容完整性
文档易理解
在线提单
论坛求助

构造函数(有参构造)

接口定义

class KBest(K_features: int, R: int, L: int, A: int, metric: string, init_builder_type: string, numa_enabled: bool, numa_nodes_number: int)

接口用途

初始化构建图检索。

参数说明

参数名称

描述

数据类型

取值范围

K_features

特征维数。

int

[1, 2999]

R

邻居节点数。

int

[11,499]

L

构图时的候选节点列表大小。

int

[11, 1999]

A

构图剪枝时的角度阈值。

int

[10, 360]

metric

距离度量的方式。其中,

字符串

“L2”“IP”

  • “L2”为欧几里得距离。
  • “IP”为内积距离。

init_builder_type

构建的索引类型。

字符串

“RNNDescent”“NNDescent”表示两种不同的构建k近邻图的算法,常使用“RNNDescent”

numa_enabled

是否开启NUMA优化。

布尔值

-

numa_nodes_number

使用的NUMA节点数量。

int

大于等于1。