12 #ifndef MLPACK_METHODS_KMEANS_HAMERLY_KMEANS_HPP 13 #define MLPACK_METHODS_KMEANS_HAMERLY_KMEANS_HPP 18 template<
typename MetricType,
typename MatType>
36 double Iterate(
const arma::mat& centroids,
37 arma::mat& newCentroids,
38 arma::Col<size_t>& counts);
40 size_t DistanceCalculations()
const {
return distanceCalculations; }
44 const MatType& dataset;
49 arma::vec minClusterDistances;
52 arma::vec upperBounds;
54 arma::vec lowerBounds;
56 arma::Col<size_t> assignments;
59 size_t distanceCalculations;
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
HamerlyKMeans(const MatType &dataset, MetricType &metric)
Construct the HamerlyKMeans object, which must store several sets of bounds.
Definition: hamerly_kmeans_impl.hpp:22
double Iterate(const arma::mat ¢roids, arma::mat &newCentroids, arma::Col< size_t > &counts)
Run a single iteration of Hamerly's algorithm, updating the given centroids into the newCentroids mat...
Definition: hamerly_kmeans_impl.hpp:32
Definition: hamerly_kmeans.hpp:19