MLPACK  1.0.4
Public Member Functions | Static Public Member Functions
mlpack::kmeans::MaxVarianceNewCluster Class Reference

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...

List of all members.

Public Member Functions

 MaxVarianceNewCluster ()
 Default constructor required by EmptyClusterPolicy.

Static Public Member Functions

template<typename MatType >
static size_t EmptyCluster (const MatType &data, const size_t emptyCluster, const MatType &centroids, 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.

Detailed Description

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.


Constructor & Destructor Documentation

Default constructor required by EmptyClusterPolicy.

Definition at line 40 of file max_variance_new_cluster.hpp.


Member Function Documentation

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:
MatTypeType of data (arma::mat or arma::spmat).
Parameters:
dataDataset on which clustering is being performed.
emptyClusterIndex of cluster which is empty.
centroidsCentroids of each cluster (one per column).
clusterCountsNumber of points in each cluster.
assignmentsCluster assignments of each point.
Returns:
Number of points changed.

The documentation for this class was generated from the following file: