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... | |
Definition at line 23 of file sample_initialization.hpp.
|
inline |
Empty constructor, required by the InitialPartitionPolicy type definition.
Definition at line 27 of file sample_initialization.hpp.
|
inlinestatic |
Initialize the centroids matrix by randomly sampling points from the data matrix.
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().