AscendIndexGreatInitParams

API definition

AscendIndexGreatInitParams();

Function

Data structure of the initialization parameter in KMode mode.

Input

N/A

Output

N/A

Restrictions

For details, see AscendIndexGreatInitParams.

API definition

AscendIndexGreatInitParams(int dim, int degree, int convPQM, int evaluationType, int expandingFactor);

Function

Data structure of the initialization parameter in KMode mode.

Input

  • int dim: dimension of the feature vector.
  • int degree: controls the precision of graph indexes in the index building phase. A larger value indicates a more refined graph index, larger space occupied, and more accurate retrieval.
  • int convPQM: number of vector segments for PQ quantization.
  • int evaluationType: distance evaluation algorithm type. The value 0 indicates IP, and the value 1 indicates L2.
  • int expandingFactor: number of neighbors for searching each layer in the initial graph construction phase. Note that this parameter is different from expandingFactor in the retrieval phase.

Output

N/A

Restrictions

  • dim ∈ {128, 256, 512, 1024}. The default value is 256.
  • degree ∈ [50, 100]. The default value is 50.
  • convPQM: The value is greater than or equal to 16 and must be a multiple of 8 and can be exactly divided by dim. The default value is 128.
  • evaluationType ∈ {0, 1}. The default value is 0.
  • expandingFactor ∈ [200, 400]. Its value must be a multiple of 10. The default value is 300.