Parametrized Constructor
API Definition
KBest(int K_features, int R, int L, int A, const char *metric, const std::string &init_builder_type);
KBest(int K_features, 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 |
Description |
Data Type |
Value Range |
|---|---|---|---|
K_features |
Feature dimension. |
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 |
[1, 360] |
metric |
Distance measurement indicator. |
const char * |
L2 or IP.
|
init_builder_type |
Algorithm for building the k-nearest neighbor graph. |
const std::string & |
RNNDescent and NNDescent indicate two different algorithms for building the k-nearest neighbor graph. RNNDescent is often used. |
graph_opt_iter |
Number of rounds for graph index self-iteration. |
int |
[0, 30] |
index_type |
Neighbor selection strategy. |
const std::string & |
HNSW, NSG, TSDG, and SSG indicate the four different neighbor selection strategies. |