pub struct KMeans {
pub centroids: Arc<FixedSizeListArray>,
pub k: u32,
}
Expand description
KMeans implementation for Apache Arrow Arrays.
Fields§
§centroids: Arc<FixedSizeListArray>
Centroids for each of the k clusters.
k * dimension.
k: u32
The number of clusters
Implementations§
source§impl KMeans
impl KMeans
sourcepub async fn new(data: Arc<FixedSizeListArray>, k: u32, max_iters: u32) -> Self
pub async fn new(data: Arc<FixedSizeListArray>, k: u32, max_iters: u32) -> Self
Train a KMean on data with k
clusters.