公有成员 | 保护属性

CHierarchical类参考


详细描述

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

\[ \min\{d({\bf x},{\bf x'}): {\bf x}\in {\cal A},{\bf x'}\in {\cal B}\} \]

are merged.

cf e.g. http://en.wikipedia.org/wiki/Data_clustering

在文件Hierarchical.h37行定义。

继承图,类CHierarchical
Inheritance graph
[图例]

所有成员的列表。

公有成员

 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 CLabelsclassify ()
virtual CLabelsclassify (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_tmerge_distance
 distance at which pair i/j was added

构造及析构函数文档

default constructor

在文件Hierarchical.cpp34行定义。

CHierarchical ( int32_t  merges,
CDistance d 
)

constructor

参数:
mergesthe merges
ddistance

在文件Hierarchical.cpp40行定义。

~CHierarchical (  ) [virtual]

在文件Hierarchical.cpp47行定义。


成员函数文档

virtual CLabels* classify (  ) [virtual]

classify objects using the currently set features

返回:
classified labels

实现了CClassifier

在文件Hierarchical.h172行定义。

virtual CLabels* classify ( CFeatures data ) [virtual]

classify objects

参数:
data(test)data to be classified
返回:
classified labels

实现了CClassifier

在文件Hierarchical.h183行定义。

void get_assignment ( int32_t *&  assign,
int32_t &  num 
)

get assignment

参数:
assigncurrent assignment is stored in here
numnumber of assignments is stored in here

在文件Hierarchical.h105行定义。

virtual EClassifierType get_classifier_type (  ) [virtual]

get classifier type

返回:
classifier type HIERARCHICAL

重载CClassifier

在文件Hierarchical.h55行定义。

void get_cluster_pairs ( int32_t **  tuples,
int32_t *  rows,
int32_t *  num 
)

get cluster pairs (swig compatible)

参数:
tuplescurrent pairs are stored in here
rowsnumber of rows is stored in here
numnumber of pairs is stored in here

在文件Hierarchical.h156行定义。

void get_merge_distance ( float64_t *&  dist,
int32_t &  num 
)

get merge distance

参数:
distcurrent merge distance is stored in here
numnumber of merge distances is stored in here

在文件Hierarchical.h116行定义。

void get_merge_distances ( float64_t **  dist,
int32_t *  num 
)

get merge distances (swig compatible)

参数:
distcurrent merge distances are stored in here
numnumber of merge distances are stored in here

在文件Hierarchical.h127行定义。

int32_t get_merges (  )

get merges

返回:
merges

在文件Hierarchical.h95行定义。

virtual const char* get_name (  ) const [virtual]
返回:
object name

实现了CSGObject

在文件Hierarchical.h190行定义。

void get_pairs ( int32_t *&  tuples,
int32_t &  rows,
int32_t &  num 
)

get pairs

参数:
tuplescurrent pairs are stored in here
rowsnumber of rows is stored in here
numnumber of pairs is stored in here

在文件Hierarchical.h143行定义。

bool load ( FILE *  srcfile ) [virtual]

load distance machine from file

参数:
srcfilefile to load from
返回:
if loading was successful

重载CClassifier

在文件Hierarchical.cpp153行定义。

bool save ( FILE *  dstfile ) [virtual]

save distance machine to file

参数:
dstfilefile to save to
返回:
if saving was successful

重载CClassifier

在文件Hierarchical.cpp158行定义。

void set_merges ( int32_t  m )

set merges

参数:
mnew merges

在文件Hierarchical.h85行定义。

bool train ( CFeatures data = NULL ) [virtual]

estimate hierarchical clustering

参数:
datatraining data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data)
返回:
whether training was successful

重载CClassifier

在文件Hierarchical.cpp54行定义。


成员数据文档

int32_t* assignment [protected]

cluster assignment for the num_points

在文件Hierarchical.h203行定义。

int32_t assignment_size [protected]

size of assignment table

在文件Hierarchical.h200行定义。

int32_t dimensions [protected]

number of dimensions

在文件Hierarchical.h197行定义。

float64_t* merge_distance [protected]

distance at which pair i/j was added

在文件Hierarchical.h212行定义。

int32_t merges [protected]

the number of merges in hierarchical clustering

在文件Hierarchical.h194行定义。

int32_t* pairs [protected]

tuples of i/j

在文件Hierarchical.h209行定义。

int32_t table_size [protected]

size of the below tables

在文件Hierarchical.h206行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation