mlpack
gitmaster

SampleInitialization Class Reference
Public Member Functions  
SampleInitialization ()  
Empty constructor, required by the InitialPartitionPolicy type definition. More...  
Static Public Member Functions  
template < typename MatType >  
static void  Cluster (const MatType &data, const size_t clusters, arma::mat ¢roids) 
Initialize the centroids matrix by randomly sampling points from the data matrix. More...  
Detailed Description
Definition at line 23 of file sample_initialization.hpp.
Constructor & Destructor Documentation
◆ SampleInitialization()

inline 
Empty constructor, required by the InitialPartitionPolicy type definition.
Definition at line 27 of file sample_initialization.hpp.
Member Function Documentation
◆ Cluster()

inlinestatic 
Initialize the centroids matrix by randomly sampling points from the data matrix.
 Parameters

data Dataset. clusters Number of clusters. centroids Matrix to put initial centroids into.
Definition at line 38 of file sample_initialization.hpp.
References mlpack::math::RandInt().
The documentation for this class was generated from the following file:
 src/mlpack/methods/kmeans/sample_initialization.hpp
Generated by 1.8.13