mlpack  2.2.5
ElkanKMeans< MetricType, MatType > Class Template Reference

Public Member Functions

 ElkanKMeans (const MatType &dataset, MetricType &metric)
 Construct the ElkanKMeans object, which must store several sets of bounds. More...

 
size_t DistanceCalculations () const
 
double Iterate (const arma::mat &centroids, arma::mat &newCentroids, arma::Col< size_t > &counts)
 Run a single iteration of Elkan's algorithm, updating the given centroids into the newCentroids matrix. More...

 

Detailed Description


template
<
typename
MetricType
,
typename
MatType
>

class mlpack::kmeans::ElkanKMeans< MetricType, MatType >

Definition at line 19 of file elkan_kmeans.hpp.

Constructor & Destructor Documentation

◆ ElkanKMeans()

ElkanKMeans ( const MatType &  dataset,
MetricType &  metric 
)

Construct the ElkanKMeans object, which must store several sets of bounds.

Member Function Documentation

◆ DistanceCalculations()

size_t DistanceCalculations ( ) const
inline

Definition at line 39 of file elkan_kmeans.hpp.

◆ Iterate()

double Iterate ( const arma::mat &  centroids,
arma::mat &  newCentroids,
arma::Col< size_t > &  counts 
)

Run a single iteration of Elkan'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 file: