#[repr(C)]pub struct cuvsKMeansParams {Show 13 fields
pub metric: cuvsDistanceType,
pub n_clusters: c_int,
pub init: cuvsKMeansInitMethod,
pub max_iter: c_int,
pub tol: f64,
pub n_init: c_int,
pub oversampling_factor: f64,
pub batch_samples: c_int,
pub batch_centroids: c_int,
pub inertia_check: bool,
pub hierarchical: bool,
pub hierarchical_n_iters: c_int,
pub streaming_batch_size: i64,
}Expand description
@brief Hyper-parameters for the kmeans algorithm
Fields§
§metric: cuvsDistanceType§n_clusters: c_intThe number of clusters to form as well as the number of centroids to generate (default:8).
init: cuvsKMeansInitMethodMethod for initialization, defaults to k-means++:
- cuvsKMeansInitMethod::KMeansPlusPlus (k-means++): Use scalable k-means++ algorithm to select the initial cluster centers.
- cuvsKMeansInitMethod::Random (random): Choose ‘n_clusters’ observations (rows) at random from the input data for the initial centroids.
- cuvsKMeansInitMethod::Array (ndarray): Use ‘centroids’ as initial cluster centers.
max_iter: c_intMaximum number of iterations of the k-means algorithm for a single run.
tol: f64Relative tolerance with regards to inertia to declare convergence.
n_init: c_intNumber of instance k-means algorithm will be run with different seeds.
oversampling_factor: f64Oversampling factor for use in the k-means|| algorithm
batch_samples: c_intbatch_samples and batch_centroids are used to tile 1NN computation which is useful to optimize/control the memory footprint Default tile is [batch_samples x n_clusters] i.e. when batch_centroids is 0 then don’t tile the centroids
batch_centroids: c_intif 0 then batch_centroids = n_clusters
inertia_check: boolCheck inertia during iterations for early convergence.
hierarchical: boolWhether to use hierarchical (balanced) kmeans or not
hierarchical_n_iters: c_intFor hierarchical k-means , defines the number of training iterations
streaming_batch_size: i64Number of samples to process per GPU batch for the batched (host-data) API. When set to 0, defaults to n_samples (process all at once).
Trait Implementations§
Source§impl Clone for cuvsKMeansParams
impl Clone for cuvsKMeansParams
Source§fn clone(&self) -> cuvsKMeansParams
fn clone(&self) -> cuvsKMeansParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more