mlpack
2.2.5

An implementation of PellegMoore's 'blacklist' algorithm for kmeans clustering. More...
Public Types  
typedef tree::KDTree< MetricType, PellegMooreKMeansStatistic, MatType >  TreeType 
Convenience typedef for the tree. More...  
Public Member Functions  
PellegMooreKMeans (const MatType &dataset, MetricType &metric)  
Construct the PellegMooreKMeans object, which must construct a tree. More...  
~PellegMooreKMeans ()  
Delete the tree constructed by the PellegMooreKMeans object. More...  
size_t  DistanceCalculations () const 
Return the number of distance calculations. More...  
size_t &  DistanceCalculations () 
Modify the number of distance calculations. More...  
double  Iterate (const arma::mat ¢roids, arma::mat &newCentroids, arma::Col< size_t > &counts) 
Run a single iteration of the PellegMoore blacklist algorithm, updating the given centroids into the newCentroids matrix. More...  
Detailed Description
template<typenameMetricType,typenameMatType>
class mlpack::kmeans::PellegMooreKMeans< MetricType, MatType >
An implementation of PellegMoore's 'blacklist' algorithm for kmeans clustering.
This algorithm builds a kdtree on the data points and traverses it in order to determine the closest clusters to each point.
For more information on the algorithm, see
Definition at line 42 of file pelleg_moore_kmeans.hpp.
Member Typedef Documentation
◆ TreeType
typedef tree::KDTree<MetricType, PellegMooreKMeansStatistic, MatType> TreeType 
Convenience typedef for the tree.
Definition at line 74 of file pelleg_moore_kmeans.hpp.
Constructor & Destructor Documentation
◆ PellegMooreKMeans()
PellegMooreKMeans  (  const MatType &  dataset, 
MetricType &  metric  
) 
Construct the PellegMooreKMeans object, which must construct a tree.
◆ ~PellegMooreKMeans()
~PellegMooreKMeans  (  ) 
Delete the tree constructed by the PellegMooreKMeans object.
Member Function Documentation
◆ DistanceCalculations() [1/2]

inline 
Return the number of distance calculations.
Definition at line 68 of file pelleg_moore_kmeans.hpp.
◆ DistanceCalculations() [2/2]

inline 
Modify the number of distance calculations.
Definition at line 70 of file pelleg_moore_kmeans.hpp.
◆ Iterate()
double Iterate  (  const arma::mat &  centroids, 
arma::mat &  newCentroids,  
arma::Col< size_t > &  counts  
) 
Run a single iteration of the PellegMoore blacklist algorithm, updating the given centroids into the newCentroids matrix.
 Parameters

centroids Current cluster centroids. newCentroids New cluster centroids. counts Current counts, to be overwritten with new counts.
The documentation for this class was generated from the following file:
 src/mlpack/methods/kmeans/pelleg_moore_kmeans.hpp
Generated by 1.8.13