Run

Currently, inner product is used to calculate the distance between feature vectors. Before inputting feature vectors, you need to perform regularization on them.

Function Usage

Perform K-Means clustering based on the parameters provided in Archive/Merge/KMeans Parameters.

Prototype

APP_ERROR Run(std::vector<float> &features, std::map<size_t, std::vector<size_t>> &resultMap);

Parameter Description

Parameter

Description

features

Input vector for feature clustering. Its length must be equal to the value of FeatureCount * Dim. It will be destroyed after feature clustering is complete to save memory.

resultMap

Output result for feature clustering.

Response Parameters

Data Structure

Description

APP_ERROR

  • 0: operation completed
  • Other values: operation failed