GClasses
|
An implementation of the K-means clustering algorithm.
#include <GCluster.h>
Public Member Functions | |
GKMeansSparse (size_t nClusters, GRand *pRand) | |
~GKMeansSparse () | |
virtual void | cluster (GSparseMatrix *pData) |
Performs clustering. More... | |
virtual size_t | whichCluster (size_t nVector) |
Identifies the cluster of the specified row. More... | |
Public Member Functions inherited from GClasses::GSparseClusterer | |
GSparseClusterer (size_t clusterCount) | |
virtual | ~GSparseClusterer () |
size_t | clusterCount () |
Return the number of clusters. More... | |
void | setMetric (GSparseSimilarity *pMetric, bool own) |
If own is true, then this takes ownership of pMetric. More... | |
Protected Attributes | |
size_t | m_nClusters |
size_t | m_nDims |
size_t * | m_pClusters |
GRand * | m_pRand |
Protected Attributes inherited from GClasses::GSparseClusterer | |
size_t | m_clusterCount |
bool | m_ownMetric |
GSparseSimilarity * | m_pMetric |
GClasses::GKMeansSparse::GKMeansSparse | ( | size_t | nClusters, |
GRand * | pRand | ||
) |
GClasses::GKMeansSparse::~GKMeansSparse | ( | ) |
|
virtual |
Performs clustering.
Implements GClasses::GSparseClusterer.
|
virtual |
Identifies the cluster of the specified row.
Implements GClasses::GSparseClusterer.
|
protected |
|
protected |
|
protected |
|
protected |