13 #ifndef MLPACK_METHODS_NYSTROEM_METHOD_KMEANS_SELECTION_HPP
14 #define MLPACK_METHODS_NYSTROEM_METHOD_KMEANS_SELECTION_HPP
28 template<
typename ClusteringType = kmeans::KMeans<>,
size_t maxIterations = 5>
40 const static arma::mat*
Select(
const arma::mat& data,
const size_t m)
42 arma::Row<size_t> assignments;
43 arma::mat* centroids =
new arma::mat;
46 ClusteringType kmeans(maxIterations);
47 kmeans.Cluster(data, m, assignments, *centroids);
The core includes that mlpack expects; standard C++ includes and Armadillo.
Implementation of the kmeans sampling scheme.
static const arma::mat * Select(const arma::mat &data, const size_t m)
Use the K-Means clustering method to select the specified number of points in the dataset...