k-means Clustering - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English

The following options are supported.

Table 4.5 Table of Options for k-means Clustering.#

Option name

Type

Default

Description

Constraints

algorithm

string

\(s=\) lloyd

Choice of underlying k-means algorithm.

\(s=\) elkan, hartigan-wong, lloyd, or macqueen.

initialization method

string

\(s=\) random

How to determine the initial cluster centres.

\(s=\) k-means++, random, random partitions, or supplied.

convergence tolerance

real

\(r=10^{-4}\)

Convergence tolerance.

\(0 \le r\)

seed

integer

\(i=0\)

Seed for random number generation; set to -1 for non-deterministic results.

\(-1 \le i\)

max_iter

integer

\(i=300\)

Maximum number of iterations.

\(1 \le i\)

n_clusters

integer

\(i=1\)

Number of clusters required.

\(1 \le i\)

check data

string

\(s=\) no

Check input data for NaNs prior to performing computation.

\(s=\) no, or yes.

n_init

integer

\(i=10\)

Number of runs with different random seeds (ignored if you have specified initial cluster centres).

\(1 \le i\)

storage order

string

\(s=\) column-major

Whether data is supplied and returned in row- or column-major order.

\(s=\) c, column-major, f, fortran, or row-major.