|
mlpack
master
|
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 ¢roids, 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... | |
Private Attributes | |
| arma::Col< size_t > | assignments |
| Holds the index of the cluster that owns each point. More... | |
| arma::mat | clusterDistances |
| Holds intra-cluster distances. More... | |
| const MatType & | dataset |
| The dataset. More... | |
| size_t | distanceCalculations |
| Track distance calculations. More... | |
| arma::mat | lowerBounds |
| Lower bounds on the distance between each point and each cluster. More... | |
| MetricType & | metric |
| The instantiated metric. More... | |
| arma::vec | minClusterDistances |
| Half the distance from a cluster to its nearest cluster (s(c)). More... | |
| arma::vec | upperBounds |
| Upper bounds on the distance between each point and its closest cluster. More... | |
Definition at line 19 of file elkan_kmeans.hpp.
| mlpack::kmeans::ElkanKMeans< MetricType, MatType >::ElkanKMeans | ( | const MatType & | dataset, |
| MetricType & | metric | ||
| ) |
Construct the ElkanKMeans object, which must store several sets of bounds.
|
inline |
Definition at line 39 of file elkan_kmeans.hpp.
References mlpack::kmeans::ElkanKMeans< MetricType, MatType >::distanceCalculations.
| double mlpack::kmeans::ElkanKMeans< MetricType, MatType >::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.
| centroids | Current cluster centroids. |
| newCentroids | New cluster centroids. |
| counts | Current counts, to be overwritten with new counts. |
|
private |
Holds the index of the cluster that owns each point.
Definition at line 53 of file elkan_kmeans.hpp.
|
private |
Holds intra-cluster distances.
Definition at line 48 of file elkan_kmeans.hpp.
|
private |
The dataset.
Definition at line 43 of file elkan_kmeans.hpp.
|
private |
Track distance calculations.
Definition at line 61 of file elkan_kmeans.hpp.
Referenced by mlpack::kmeans::ElkanKMeans< MetricType, MatType >::DistanceCalculations().
|
private |
Lower bounds on the distance between each point and each cluster.
Definition at line 58 of file elkan_kmeans.hpp.
|
private |
The instantiated metric.
Definition at line 45 of file elkan_kmeans.hpp.
|
private |
Half the distance from a cluster to its nearest cluster (s(c)).
Definition at line 50 of file elkan_kmeans.hpp.
|
private |
Upper bounds on the distance between each point and its closest cluster.
Definition at line 56 of file elkan_kmeans.hpp.
1.8.11