mlpack  1.0.12
max_variance_new_cluster.hpp
Go to the documentation of this file.
1 
16 #ifndef __MLPACK_METHODS_KMEANS_MAX_VARIANCE_NEW_CLUSTER_HPP
17 #define __MLPACK_METHODS_KMEANS_MAX_VARIANCE_NEW_CLUSTER_HPP
18 
19 #include <mlpack/core.hpp>
20 
21 namespace mlpack {
22 namespace kmeans {
23 
29 {
30  public:
33 
47  template<typename MatType>
48  static size_t EmptyCluster(const MatType& data,
49  const size_t emptyCluster,
50  const MatType& centroids,
51  arma::Col<size_t>& clusterCounts,
52  arma::Col<size_t>& assignments);
53 };
54 
55 }; // namespace kmeans
56 }; // namespace mlpack
57 
58 // Include implementation.
59 #include "max_variance_new_cluster_impl.hpp"
60 
61 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:23
MaxVarianceNewCluster()
Default constructor required by EmptyClusterPolicy.
When an empty cluster is detected, this class takes the point furthest from the centroid of the clust...
static size_t EmptyCluster(const MatType &data, const size_t emptyCluster, const MatType &centroids, arma::Col< size_t > &clusterCounts, arma::Col< size_t > &assignments)
Take the point furthest from the centroid of the cluster with maximum variance to be a new cluster...