When an empty cluster is detected, this class takes the point furthest from the centroid of the cluster with maximum variance as a new cluster.
More...
|
template<typename MatType > |
static size_t | EmptyCluster (const MatType &data, const size_t emptyCluster, const MatType ¢roids, arma::Col< size_t > &clusterCounts, arma::Col< size_t > &assignments) |
| Take the point furthest from the centroid of the cluster with maximum variance to be a new cluster. More...
|
|
When an empty cluster is detected, this class takes the point furthest from the centroid of the cluster with maximum variance as a new cluster.
Definition at line 36 of file max_variance_new_cluster.hpp.
mlpack::kmeans::MaxVarianceNewCluster::MaxVarianceNewCluster |
( |
| ) |
|
|
inline |
template<typename MatType >
static size_t mlpack::kmeans::MaxVarianceNewCluster::EmptyCluster |
( |
const MatType & |
data, |
|
|
const size_t |
emptyCluster, |
|
|
const MatType & |
centroids, |
|
|
arma::Col< size_t > & |
clusterCounts, |
|
|
arma::Col< size_t > & |
assignments |
|
) |
| |
|
static |
Take the point furthest from the centroid of the cluster with maximum variance to be a new cluster.
- Template Parameters
-
MatType | Type of data (arma::mat or arma::sp_mat). |
- Parameters
-
data | Dataset on which clustering is being performed. |
emptyCluster | Index of cluster which is empty. |
centroids | Centroids of each cluster (one per column). |
clusterCounts | Number of points in each cluster. |
assignments | Cluster assignments of each point. |
- Returns
- Number of points changed.
The documentation for this class was generated from the following file: