mlpack
Public Member Functions | List of all members
mlpack::kmeans::HamerlyKMeans< MetricType, MatType > Class Template Reference

Public Member Functions

 HamerlyKMeans (const MatType &dataset, MetricType &metric)
 Construct the HamerlyKMeans object, which must store several sets of bounds.
 
double Iterate (const arma::mat &centroids, arma::mat &newCentroids, arma::Col< size_t > &counts)
 Run a single iteration of Hamerly's algorithm, updating the given centroids into the newCentroids matrix. More...
 
size_t DistanceCalculations () const
 

Member Function Documentation

◆ Iterate()

template<typename MetricType , typename MatType >
double mlpack::kmeans::HamerlyKMeans< MetricType, MatType >::Iterate ( const arma::mat &  centroids,
arma::mat &  newCentroids,
arma::Col< size_t > &  counts 
)

Run a single iteration of Hamerly's algorithm, updating the given centroids into the newCentroids matrix.

Parameters
centroidsCurrent cluster centroids.
newCentroidsNew cluster centroids.
countsCurrent counts, to be overwritten with new counts.

The documentation for this class was generated from the following files: