Parametrized Constructor
API Definition
KBest(int dim, int R, int L, int A, const char *metric, const std::string &init_builder_type);
KBest(int dim, int R, int L, float A, int graph_opt_iter, const std::string &metric, const std::string &init_builder_type, const std::string &index_type);
Function
Initializes the build of graph search.
Parameters
Parameter |
Data Type |
Description |
Value Range |
|---|---|---|---|
dim |
int |
Feature dimension. |
[1, 2999] |
R |
int |
Number of neighboring nodes. |
[11, 499] |
L |
int |
Size of the candidate node list during the graph build. |
[11, 1999] |
A |
int |
Angle threshold during the pruning of graph build. |
[11,360] |
metric |
const char * |
Distance measurement indicator. |
L2 or IP.
|
init_builder_type |
const std::string & |
Algorithm for building the k-nearest neighbor graph. |
RNNDescent and NNDescent indicate two different algorithms for building the k-nearest neighbor graph. RNNDescent is often used. |
graph_opt_iter |
int |
Number of rounds for graph index self-iteration. |
[0, 30] |
index_type |
const std::string & |
Neighbor selection strategy. |
HNSW, NSG, TSDG, and SSG indicate the four different neighbor selection strategies. |