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 &centroids)
 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()

Empty constructor, required by the InitialPartitionPolicy type definition.

Definition at line 27 of file sample_initialization.hpp.

Member Function Documentation

◆ Cluster()

static void Cluster ( const MatType &  data,
const size_t  clusters,
arma::mat &  centroids 
)
inlinestatic

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

Parameters
dataDataset.
clustersNumber of clusters.
centroidsMatrix 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: