1#ifndef KMEANS_INITIALIZE_NONE_HPP
2#define KMEANS_INITIALIZE_NONE_HPP
28template<
typename Index_,
typename Data_,
typename Cluster_,
typename Float_,
class Matrix_ = Matrix<Index_, Data_> >
34 Cluster_
run(
const Matrix_& matrix, Cluster_ ncenters, Float_*)
const {
35 return std::min(matrix.num_observations(),
static_cast<Index_
>(ncenters));
Interface for k-means initialization.
No-op "initialization" with existing cluster centers.
Definition InitializeNone.hpp:29
Interface for k-means initialization algorithms.
Definition Initialize.hpp:27
virtual Cluster_ run(const Matrix_ &data, Cluster_ num_centers, Float_ *centers) const =0
Namespace for k-means clustering.
Definition compute_wcss.hpp:12