#include <HierarchicalClusterPicker.h>

Public Types | |
| enum | ClusterMethod { WARD = 1, SLINK = 2, CLINK = 3, UPGMA = 4, MCQUITTY = 5, GOWER = 6, CENTROID = 7 } |
| The type of hierarchical clustering algorithm to use. More... | |
Public Member Functions | |
| HierarchicalClusterPicker (ClusterMethod clusterMethod) | |
| Constructor - takes a ClusterMethod as an argument. | |
| RDKit::INT_VECT | pick (const double *distMat, unsigned int poolSize, unsigned int pickSize) const |
| This is the function that does the picking. | |
| RDKit::VECT_INT_VECT | cluster (const double *distMat, unsigned int poolSize, unsigned int pickSize) const |
| This is the function that does the clustering of the items - used by the picker. | |
This class inherits from DistPicker since it uses the distance matrix for diversity picking. The clustering itself is done using the Murtagh code in $RDBASE/Code/ML/Cluster/Mutagh/
Definition at line 20 of file HierarchicalClusterPicker.h.
The type of hierarchical clustering algorithm to use.
Definition at line 25 of file HierarchicalClusterPicker.h.
| RDPickers::HierarchicalClusterPicker::HierarchicalClusterPicker | ( | ClusterMethod | clusterMethod | ) | [inline, explicit] |
Constructor - takes a ClusterMethod as an argument.
Sets the hierarch clustering method
Definition at line 38 of file HierarchicalClusterPicker.h.
| RDKit::INT_VECT RDPickers::HierarchicalClusterPicker::pick | ( | const double * | distMat, | |
| unsigned int | poolSize, | |||
| unsigned int | pickSize | |||
| ) | const [virtual] |
This is the function that does the picking.
Here is how the algorithm works
FIX: Supply reference
| distMat | - distance matrix - a vector of double. It is assumed that only the lower triangle element of the matrix are supplied in a 1D array NOTE: this matrix WILL BE ALTERED during the picking | |
| poolSize | - the size of the pool to pick the items from. It is assumed that the distance matrix above contains the right number of elements; i.e. poolSize*(poolSize-1) | |
| pickSize | - the number items to pick from pool (<= poolSize) |
Implements RDPickers::DistPicker.
| RDKit::VECT_INT_VECT RDPickers::HierarchicalClusterPicker::cluster | ( | const double * | distMat, | |
| unsigned int | poolSize, | |||
| unsigned int | pickSize | |||
| ) | const |
This is the function that does the clustering of the items - used by the picker.
ARGUMENTS:
| distMat | - distance matrix - a vector of double. It is assumed that only the lower triangle element of the matrix are supplied in a 1D array NOTE: this matrix WILL BE ALTERED during the picking | |
| poolSize | - the size of the pool to pick the items from. It is assumed that the distance matrix above contains the right number of elements; i.e. poolSize*(poolSize-1) | |
| pickSize | - the number clusters to divide the pool into (<= poolSize) |
1.5.5