Agglomerative hierarchical single linkage clustering.
Starting with each object being assigned to its own cluster clusters are iteratively merged. Here the clusters are merged whose elements have minimum distance, i.e. the clusters A and B that obtain
are merged.
cf e.g. http://en.wikipedia.org/wiki/Data_clustering
在文件Hierarchical.h第37行定义。
公有成员 | |
CHierarchical () | |
CHierarchical (int32_t merges, CDistance *d) | |
virtual | ~CHierarchical () |
virtual EClassifierType | get_classifier_type () |
virtual bool | train (CFeatures *data=NULL) |
virtual bool | load (FILE *srcfile) |
virtual bool | save (FILE *dstfile) |
void | set_merges (int32_t m) |
int32_t | get_merges () |
void | get_assignment (int32_t *&assign, int32_t &num) |
void | get_merge_distance (float64_t *&dist, int32_t &num) |
void | get_merge_distances (float64_t **dist, int32_t *num) |
void | get_pairs (int32_t *&tuples, int32_t &rows, int32_t &num) |
void | get_cluster_pairs (int32_t **tuples, int32_t *rows, int32_t *num) |
virtual CLabels * | classify () |
virtual CLabels * | classify (CFeatures *data) |
virtual const char * | get_name () const |
保护属性 | |
int32_t | merges |
the number of merges in hierarchical clustering | |
int32_t | dimensions |
number of dimensions | |
int32_t | assignment_size |
size of assignment table | |
int32_t * | assignment |
cluster assignment for the num_points | |
int32_t | table_size |
size of the below tables | |
int32_t * | pairs |
tuples of i/j | |
float64_t * | merge_distance |
distance at which pair i/j was added |
CHierarchical | ( | ) |
default constructor
在文件Hierarchical.cpp第34行定义。
CHierarchical | ( | int32_t | merges, | |
CDistance * | d | |||
) |
~CHierarchical | ( | ) | [virtual] |
在文件Hierarchical.cpp第47行定义。
virtual CLabels* classify | ( | ) | [virtual] |
classify objects using the currently set features
实现了CClassifier。
在文件Hierarchical.h第172行定义。
classify objects
data | (test)data to be classified |
实现了CClassifier。
在文件Hierarchical.h第183行定义。
void get_assignment | ( | int32_t *& | assign, | |
int32_t & | num | |||
) |
get assignment
assign | current assignment is stored in here | |
num | number of assignments is stored in here |
在文件Hierarchical.h第105行定义。
virtual EClassifierType get_classifier_type | ( | ) | [virtual] |
void get_cluster_pairs | ( | int32_t ** | tuples, | |
int32_t * | rows, | |||
int32_t * | num | |||
) |
get cluster pairs (swig compatible)
tuples | current pairs are stored in here | |
rows | number of rows is stored in here | |
num | number of pairs is stored in here |
在文件Hierarchical.h第156行定义。
void get_merge_distance | ( | float64_t *& | dist, | |
int32_t & | num | |||
) |
get merge distance
dist | current merge distance is stored in here | |
num | number of merge distances is stored in here |
在文件Hierarchical.h第116行定义。
void get_merge_distances | ( | float64_t ** | dist, | |
int32_t * | num | |||
) |
get merge distances (swig compatible)
dist | current merge distances are stored in here | |
num | number of merge distances are stored in here |
在文件Hierarchical.h第127行定义。
int32_t get_merges | ( | ) |
virtual const char* get_name | ( | ) | const [virtual] |
void get_pairs | ( | int32_t *& | tuples, | |
int32_t & | rows, | |||
int32_t & | num | |||
) |
get pairs
tuples | current pairs are stored in here | |
rows | number of rows is stored in here | |
num | number of pairs is stored in here |
在文件Hierarchical.h第143行定义。
bool load | ( | FILE * | srcfile | ) | [virtual] |
load distance machine from file
srcfile | file to load from |
重载CClassifier。
在文件Hierarchical.cpp第153行定义。
bool save | ( | FILE * | dstfile | ) | [virtual] |
save distance machine to file
dstfile | file to save to |
重载CClassifier。
在文件Hierarchical.cpp第158行定义。
void set_merges | ( | int32_t | m | ) |
bool train | ( | CFeatures * | data = NULL |
) | [virtual] |
estimate hierarchical clustering
data | training data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data) |
重载CClassifier。
在文件Hierarchical.cpp第54行定义。
int32_t* assignment [protected] |
cluster assignment for the num_points
在文件Hierarchical.h第203行定义。
int32_t assignment_size [protected] |
size of assignment table
在文件Hierarchical.h第200行定义。
int32_t dimensions [protected] |
number of dimensions
在文件Hierarchical.h第197行定义。
float64_t* merge_distance [protected] |
distance at which pair i/j was added
在文件Hierarchical.h第212行定义。
int32_t merges [protected] |
the number of merges in hierarchical clustering
在文件Hierarchical.h第194行定义。
int32_t* pairs [protected] |
tuples of i/j
在文件Hierarchical.h第209行定义。
int32_t table_size [protected] |
size of the below tables
在文件Hierarchical.h第206行定义。