10using MatrixRXf = Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
43inline std::vector<unsigned> M_EXPORT
kmeans(
const Eigen::MatrixXf &data,
unsigned k) {
std::pair< std::vector< unsigned >, MatrixRXf > M_EXPORT kmeans_with_centroids(const Eigen::MatrixXf &data, unsigned k)
Clusters the given data according to the k-means algorithm.
MatrixRXf M_EXPORT kmeans_plus_plus(const Eigen::MatrixXf &data, unsigned k)
Compute initial cluster centroids using k-means++ algorithm.
Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixRXf
std::vector< unsigned > M_EXPORT kmeans(const Eigen::MatrixXf &data, unsigned k)
Clusters the given data according to the k-means algorithm.