Functions
ML::kmeans::opg Namespace Reference

Functions

void fit (const raft::resources &handle, const KMeansParams &params, const float *X, int n_samples, int n_features, const float *sample_weight, float *centroids, float &inertia, int &n_iter)
 Compute k-means clustering. More...
 
void fit (const raft::resources &handle, const KMeansParams &params, const double *X, int n_samples, int n_features, const double *sample_weight, double *centroids, double &inertia, int &n_iter)
 
void fit (const raft::resources &handle, const KMeansParams &params, const float *X, int64_t n_samples, int64_t n_features, const float *sample_weight, float *centroids, float &inertia, int64_t &n_iter)
 
void fit (const raft::resources &handle, const KMeansParams &params, const double *X, int64_t n_samples, int64_t n_features, const double *sample_weight, double *centroids, double &inertia, int64_t &n_iter)
 

Function Documentation

◆ fit() [1/4]

void ML::kmeans::opg::fit ( const raft::resources &  handle,
const KMeansParams params,
const double *  X,
int  n_samples,
int  n_features,
const double *  sample_weight,
double *  centroids,
double &  inertia,
int &  n_iter 
)

◆ fit() [2/4]

void ML::kmeans::opg::fit ( const raft::resources &  handle,
const KMeansParams params,
const double *  X,
int64_t  n_samples,
int64_t  n_features,
const double *  sample_weight,
double *  centroids,
double &  inertia,
int64_t &  n_iter 
)

◆ fit() [3/4]

void ML::kmeans::opg::fit ( const raft::resources &  handle,
const KMeansParams params,
const float *  X,
int  n_samples,
int  n_features,
const float *  sample_weight,
float *  centroids,
float &  inertia,
int &  n_iter 
)

Compute k-means clustering.

Parameters
[in]handleThe handle to the cuML library context that manages the CUDA resources.
[in]paramsParameters for KMeans model.
[in]XTraining instances to cluster. It must be noted that the data must be in row-major format and stored in device accessible location.
[in]n_samplesNumber of samples in the input X.
[in]n_featuresNumber of features or the dimensions of each sample.
[in]sample_weightThe weights for each observation in X.
[in,out]centroidsWhen init is InitMethod::Array, use centroids as the initial cluster centers [out] Otherwise, generated centroids from the kmeans algorithm is stored at the address pointed by 'centroids'.
[out]inertiaSum of squared distances of samples to their closest cluster center.
[out]n_iterNumber of iterations run.

◆ fit() [4/4]

void ML::kmeans::opg::fit ( const raft::resources &  handle,
const KMeansParams params,
const float *  X,
int64_t  n_samples,
int64_t  n_features,
const float *  sample_weight,
float *  centroids,
float &  inertia,
int64_t &  n_iter 
)