|
| 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.
| mlpack::kmeans::SampleInitialization::SampleInitialization |
( |
| ) |
|
|
inline |
template<typename MatType >
| static void mlpack::kmeans::SampleInitialization::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
-
| 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: