K-Means
K-Means
Source header: cuvs/cluster/kmeans.h
k-means hyperparameters
cuvsKMeansInitMethod
k-means hyperparameters
Values
cuvsKMeansParams
Hyper-parameters for the kmeans algorithm
NB: The inertia_check field is kept for ABI compatibility. Removed in cuvsKMeansParams_v2. TODO: CalVer for the replacement: 26.08
Fields
cuvsKMeansParams_v2
Hyper-parameters for the kmeans algorithm
TODO: Remove this after cuvsKMeansParams is replaced in ABI 2.0
Fields
cuvsKMeansParamsCreate
Allocate KMeans params, and populate with default values
replaced by cuvsKMeansParamsCreate_v2.
Parameters
Returns
cuvsKMeansParamsDestroy
De-allocate KMeans params
replaced by cuvsKMeansParamsDestroy_v2.
Parameters
Returns
cuvsKMeansParamsCreate_v2
Allocate KMeans params
Mirrors cuvsKMeansParamsCreate but operates on cuvsKMeansParams_v2. Will become the unsuffixed cuvsKMeansParamsCreate in cuVS 26.08.
Parameters
Returns
cuvsKMeansParamsDestroy_v2
De-allocate KMeans params allocated by cuvsKMeansParamsCreate_v2.
Parameters
Returns
cuvsKMeansType
Type of k-means algorithm.
Values
k-means clustering APIs
cuvsKMeansFit
Find clusters with k-means algorithm.
Initial centroids are chosen with k-means++ algorithm. Empty clusters are reinitialized by choosing new centroids with k-means++ algorithm.
X may reside on either host (CPU) or device (GPU) memory. When X is on the host the data is streamed to the GPU in batches controlled by params->streaming_batch_size.
replaced by cuvsKMeansFit_v2.
Parameters
Returns
cuvsKMeansFit_v2
Find clusters with k-means algorithm (v2 params layout).
Mirrors cuvsKMeansFit but takes cuvsKMeansParams_v2_t. Will become the unsuffixed cuvsKMeansFit in cuVS 26.08.
Parameters
Returns
cuvsKMeansPredict
Predict the closest cluster each sample in X belongs to.
replaced by cuvsKMeansPredict_v2.
Parameters
Returns
cuvsKMeansPredict_v2
Predict the closest cluster each sample in X belongs to (v2 params layout).
Mirrors cuvsKMeansPredict but takes cuvsKMeansParams_v2_t. Will become the unsuffixed cuvsKMeansPredict in cuVS 26.08.
Parameters
Returns
cuvsKMeansClusterCost
Compute cluster cost
Parameters
Returns