12 #ifndef MLPACK_METHODS_KMEANS_ELKAN_KMEANS_HPP 13 #define MLPACK_METHODS_KMEANS_ELKAN_KMEANS_HPP 18 template<
typename MetricType,
typename MatType>
25 ElkanKMeans(
const MatType& dataset, MetricType& metric);
35 double Iterate(
const arma::mat& centroids,
36 arma::mat& newCentroids,
37 arma::Col<size_t>& counts);
39 size_t DistanceCalculations()
const {
return distanceCalculations; }
43 const MatType& dataset;
48 arma::mat clusterDistances;
50 arma::vec minClusterDistances;
53 arma::Col<size_t> assignments;
56 arma::vec upperBounds;
58 arma::mat lowerBounds;
61 size_t distanceCalculations;
ElkanKMeans(const MatType &dataset, MetricType &metric)
Construct the ElkanKMeans object, which must store several sets of bounds.
Definition: elkan_kmeans_impl.hpp:22
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
double Iterate(const arma::mat ¢roids, arma::mat &newCentroids, arma::Col< size_t > &counts)
Run a single iteration of Elkan's algorithm, updating the given centroids into the newCentroids matri...
Definition: elkan_kmeans_impl.hpp:33
Definition: elkan_kmeans.hpp:19