Developer Guide and Reference

  • 2021.6
  • 04/11/2022
  • Public Content
Contents

K-Means initialization

The K-Means initialization algorithm receives LaTex Math image. feature vectors as input and chooses LaTex Math image. initial centroids. After initialization, K-Means algorithm uses the initialization result to partition input data into LaTex Math image. clusters.
Operation
Computational methods
Programming Interface

Mathematical formulation

Computing
Given the training set LaTex Math image. of LaTex Math image.-dimensional feature vectors and a positive integer LaTex Math image., the problem is to find a set LaTex Math image. of LaTex Math image.-dimensional initial centroids.
Computing method:
dense
The method chooses first LaTex Math image. feature vectors from the training set LaTex Math image..

Programming Interface

Usage example

Computing
table run_compute(const table& data) { const auto kmeans_desc = kmeans_init::descriptor<float, kmeans_init::method::dense>{} .set_cluster_count(10) const auto result = compute(kmeans_desc, data); print_table("centroids", result.get_centroids()); return result.get_centroids(); }

Examples

oneAPI DPC++
Batch Processing:
oneAPI C++
Batch Processing:

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.