|
CEDRIC
Revision_backup-2009-02
|
#include <PAMClustering.h>
Public Types | |
| typedef ublas::symmetric_matrix < double, ublas::lower > | matrix_type |
| typedef std::vector< unsigned int > | ivec |
| typedef std::vector< double > | dvec |
Public Member Functions | |
| PAMClustering (const matrix_type &d, unsigned int k) | |
| ~PAMClustering () | |
| PAMClustering (PAMClustering &other) | |
| Copy constructor (copy assignment not allowed because of const referenced distance matrix) More... | |
| int | cluster (unsigned int maxIterations=10000) |
| double | calcSilhouette () |
| double | silCluster (unsigned int c) |
| const dvec & | sils () const |
| const ivec & | labels () const |
| const ivec & | medoids () const |
| unsigned int | numClusters () const |
Protected Member Functions | |
| void | label () |
| Label each point with its nearest medoid. More... | |
| bool | swap () |
| bool | isSelected (unsigned int i) |
| double | avgDist (unsigned int i, unsigned int c) |
| double | label (ivec &labels) |
Implementation of Partitioning Around Medoids algorithm. After "Finding Groups in Data: an Introduction to Cluster Analysis" by Kaufman,Rosseeuw 1990.
| typedef std::vector<double> PAMClustering::dvec |
| typedef std::vector<unsigned int> PAMClustering::ivec |
| typedef ublas::symmetric_matrix<double,ublas::lower> PAMClustering::matrix_type |
| PAMClustering::PAMClustering | ( | const matrix_type & | d, |
| unsigned int | k | ||
| ) |
Constructor (does not perform clustering, call cluster() to do this).
| d | symmetric distance matrix |
| k | number of clusters |
References label().
| PAMClustering::~PAMClustering | ( | ) |
| PAMClustering::PAMClustering | ( | PAMClustering & | other | ) |
Copy constructor (copy assignment not allowed because of const referenced distance matrix)
|
protected |
Referenced by calcSilhouette().
| double PAMClustering::calcSilhouette | ( | ) |
Calculate per point, per cluster and overall silhouette width.
References avgDist().
Referenced by AutomaticPAM::cluster(), and EventNavigator::computeClustering().
| int PAMClustering::cluster | ( | unsigned int | maxIterations = 10000 | ) |
| maxIterations | is the number of iterations after which to abort |
References swap().
Referenced by AutomaticPAM::cluster(), and EventNavigator::computeClustering().
|
protected |
Referenced by swap().
|
protected |
Label each point with its nearest medoid.
Referenced by PAMClustering(), and swap().
|
protected |
|
inline |
Referenced by EventNavigator::computeClustering().
|
inline |
Referenced by EventNavigator::computeClustering().
|
inline |
Referenced by AutomaticPAM::cluster().
| double PAMClustering::silCluster | ( | unsigned int | c | ) |
|
inline |
|
protected |
Perform PAM swap step.
References isSelected(), and label().
Referenced by cluster().
1.8.6