14 #ifndef MLPACK_METHODS_KMEANS_MAX_VARIANCE_NEW_CLUSTER_HPP 15 #define MLPACK_METHODS_KMEANS_MAX_VARIANCE_NEW_CLUSTER_HPP 48 template<
typename MetricType,
typename MatType>
50 const size_t emptyCluster,
51 const arma::mat& oldCentroids,
52 arma::mat& newCentroids,
53 arma::Col<size_t>& clusterCounts,
55 const size_t iteration);
58 template<
typename Archive>
59 void serialize(Archive& ar,
const uint32_t version);
67 arma::Row<size_t> assignments;
70 template<
typename MetricType,
typename MatType>
71 void Precalculate(
const MatType& data,
72 const arma::mat& oldCentroids,
73 arma::Col<size_t>& clusterCounts,
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
MaxVarianceNewCluster()
Default constructor required by EmptyClusterPolicy.
Definition: max_variance_new_cluster.hpp:30
The core includes that mlpack expects; standard C++ includes and Armadillo.
void EmptyCluster(const MatType &data, const size_t emptyCluster, const arma::mat &oldCentroids, arma::mat &newCentroids, arma::Col< size_t > &clusterCounts, MetricType &metric, const size_t iteration)
Take the point furthest from the centroid of the cluster with maximum variance to be a new cluster...
Definition: max_variance_new_cluster_impl.hpp:25
When an empty cluster is detected, this class takes the point furthest from the centroid of the clust...
Definition: max_variance_new_cluster.hpp:26
void serialize(Archive &ar, const uint32_t version)
Serialize the object.
Definition: max_variance_new_cluster_impl.hpp:101