1#ifndef KMEANS_KMEANS_HPP
2#define KMEANS_KMEANS_HPP
48template<
class Matrix_,
typename Cluster_,
typename Float_>
66template<
typename Cluster_,
typename Float_,
typename Index_>
71 template<
typename Dim_>
112template<
class Matrix_,
typename Cluster_,
typename Float_>
120 output.clusters.resize(
data.num_observations());
121 output.centers.resize(
static_cast<size_t>(
num_centers) *
static_cast<size_t>(
data.num_dimensions()));
Report detailed clustering statistics.
Class for kmeans++ initialization.
Class for no initialization.
Class for random initialization.
k-means initialization with variance partitioning.
Interface for k-means initialization.
Expectations for matrix inputs.
Implements the Hartigan-Wong algorithm for k-means clustering.
Implements the Lloyd algorithm for k-means clustering.
Implements the mini-batch algorithm for k-means clustering.
Interface for k-means refinement.
Implements the variance partitioning method of Su and Dy (2007).
Definition InitializeVariancePartition.hpp:164
Cluster_ run(const Matrix_ &data, Cluster_ ncenters, Float_ *centers) const
Definition InitializeVariancePartition.hpp:189
Compute within-cluster sum of squares.
Namespace for k-means clustering.
Definition compute_wcss.hpp:12
Details< typename Matrix_::index_type > compute(const Matrix_ &data, const Initialize< Matrix_, Cluster_, Float_ > &initialize, const Refine< Matrix_, Cluster_, Float_ > &refine, Cluster_ num_centers, Float_ *centers, Cluster_ *clusters)
Definition kmeans.hpp:49
Full statistics from k-means clustering.
Definition kmeans.hpp:67
std::vector< Float_ > centers
Definition kmeans.hpp:89
std::vector< Cluster_ > clusters
Definition kmeans.hpp:83
Details< Index_ > details
Definition kmeans.hpp:94