我要评分
获取效率
正确性
完整性
易理解

Parametrized Constructor

API Definition

KBest(int K_features, int R, int L, int A, const char *metric, const std::string &init_builder_type);

Function

Initialize the build of graph search.

Parameters

Parameter

Description

Data Type

Value Range

K_features

Number of feature dimensions.

int

[1, 2999]

R

Number of neighboring nodes.

int

[11, 499]

L

Size of the candidate node list during the graph build.

int

[11, 1999]

A

Angle threshold during the pruning of graph build.

int

[10, 360]

metric

Distance measurement indicator.

const char *

L2 or IP.

  • L2 indicates the Euclidean distance.
  • IP indicates the inner product distance.

init_builder_type

Type of the index to build.

const std::string &

RNNDescent or NNDescent.

RNNDescent and NNDescent indicate two different algorithms for building the k-nearest neighbor graph. RNNDescent is often used.