CluE
1.0
|
Clustering feature tree. More...
#include <cftree.h>
Classes | |
struct | ThresholdCalculator |
Threshold calculation functor class. More... | |
Public Types | |
enum | ExceptionIds { CANNOT_MERGE_NODE_ITSELF, CANNOT_MERGE_NODE_DIFFERENT_PARENTS, CANNOT_MERGE_LEAF_NODES } |
Public Member Functions | |
CFTree (EuclideanSpaceProvider< T > *euclidianProvider, DissimilarityMeasure< CFEntry< T > > *clusterDistanceMeasure, AttributeCalculator< CFEntry< T > > *thresholdAttribute, ThresholdCalculator *thresholdFunctor, int innerBranching, int leafBranching, double threshold, int maxSize) | |
Constructs a CFTree for a given vector space. More... | |
CFTree (const CFTree< T > &) | |
CFTree< T > & | operator= (const CFTree< T > &) |
virtual | ~CFTree () |
void | insert (T point) |
Inserts a point. More... | |
void | insert (CFEntry< T > feature) |
Inserts a CFEntry (clustering feature) More... | |
void | rebuild (double newThreshold) |
Rebuild the tree. More... | |
std::vector< CFEntry< T > > | leafEntries () |
Returns the leaf entries. More... | |
int | size () const |
Counts the number of nodes. More... | |
size_t | numberOfPoints () const |
Counts the number of contained points. More... | |
Private Member Functions | |
lemon::ListDigraph::Node | addNode () |
Wrapper to maintain the graph maps. More... | |
void | eraseNode (lemon::ListDigraph::Node node) |
Wrapper to maintain the graph maps. More... | |
void | rebuildTraverse (lemon::ListDigraph::Node currentOldNode, CFTree< T > &newTree, lemon::ListDigraph::Node currentNewNode) |
Used by rebuild() More... | |
void | leafEntriesTraverse (lemon::ListDigraph::Node currentNode, std::vector< CFEntry< T > > *vec) |
void | clean (lemon::ListDigraph::Node node) |
Remove empty clustering features. More... | |
std::pair < lemon::ListDigraph::Node, lemon::ListDigraph::Node > | split (lemon::ListDigraph::Node node, CFEntry< T > *keepTrack=0, bool fillUp=false) |
Splits a node. More... | |
lemon::ListDigraph::Node | merge (lemon::ListDigraph::Node node1, lemon::ListDigraph::Node node2) |
Merges two node entries. More... | |
Private Attributes | |
int | innerBranching |
int | leafBranching |
double | threshold |
int | maxSize |
EuclideanSpaceProvider< T > * | euclidianProvider |
DissimilarityMeasure< CFEntry < T > > * | clusterDistanceMeasure |
AttributeCalculator< CFEntry < T > > * | thresholdAttribute |
ThresholdCalculator * | thresholdFunctor |
lemon::ListDigraph | tree |
lemon::ListDigraph::ArcMap < CFEntry< T > * > | innerFeatures |
lemon::ListDigraph::NodeMap < std::vector< CFEntry< T > * > * > | leafFeatures |
lemon::ListDigraph::Node | root |
Clustering feature tree.
Clustering tree as described in T. Zhang, R. Ramakrishan and M. Livny. "BIRCH: A New Data Clustering Algorithm and Its Applications". Data Mining and Knowledge Discovery, 10.1023/A:1009783824328, 1997.
enum CluE::CFTree::ExceptionIds |
CluE::CFTree< T >::CFTree | ( | EuclideanSpaceProvider< T > * | euclidianProvider, |
DissimilarityMeasure< CFEntry< T > > * | clusterDistanceMeasure, | ||
AttributeCalculator< CFEntry< T > > * | thresholdAttribute, | ||
ThresholdCalculator * | thresholdFunctor, | ||
int | innerBranching, | ||
int | leafBranching, | ||
double | threshold, | ||
int | maxSize | ||
) |
Constructs a CFTree for a given vector space.
euclidianProvider | Euclidiean vector space provider |
clusterDistanceMeasure | To calculate the distance between to given CFEntries |
thresholdAttribute | To calculate the value of the threshold attribute of a given CFEntry |
innerBranching | Inner branching factor |
leafBranching | Leaf branching factor |
threshold | CFEntry size threshold |
CluE::CFTree< T >::CFTree | ( | const CFTree< T > & | x | ) |
|
virtual |
CFTree< T > & CluE::CFTree< T >::operator= | ( | const CFTree< T > & | x | ) |
void CluE::CFTree< T >::insert | ( | T | point | ) |
void CluE::CFTree< T >::insert | ( | CFEntry< T > | feature | ) |
void CluE::CFTree< T >::rebuild | ( | double | newThreshold | ) |
std::vector< CFEntry< T > > CluE::CFTree< T >::leafEntries | ( | ) |
int CluE::CFTree< T >::size | ( | ) | const |
size_t CluE::CFTree< T >::numberOfPoints | ( | ) | const |
|
private |
|
private |
|
private |
|
private |
Used by leafEntries()
|
private |
|
private |
|
private |
Merges two node entries.
InvalidArgumentException | [CANNOT_MERGE_NODE_ITSELF] Cannot merge node with itself. |
InvalidArgumentException | [CANNOT_MERGE_NODE_DIFFERENT_PARENTS] Cannot merge nodes with different parents. |
InvalidRuntimeConfigurationException | [CANNOT_MERGE_LEAF_NODES] Cannot merge leaf entries. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |