CLabels类参考


详细描述

The class Labels models labels, i.e. class assignments of objects.

Labels here are always real-valued and thus applicable to classification (cf. CClassifier) and regression (cf. CRegression) problems.

在文件Labels.h26行定义。

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

所有成员的列表。

公有成员

 CLabels ()
 CLabels (int32_t num_labels)
 CLabels (float64_t *src, int32_t len)
 CLabels (char *fname)
virtual ~CLabels ()
bool load (char *fname)
bool save (char *fname)
bool set_label (int32_t idx, float64_t label)
bool set_int_label (int32_t idx, int32_t label)
float64_t get_label (int32_t idx)
int32_t get_int_label (int32_t idx)
bool is_two_class_labeling ()
int32_t get_num_classes ()
float64_tget_labels (int32_t &len)
void get_labels (float64_t **dst, int32_t *len)
void set_labels (float64_t *src, int32_t len)
int32_t * get_int_labels (int32_t &len)
void set_int_labels (int32_t *labels, int32_t len)
int32_t get_num_labels ()
virtual const char * get_name () const

保护属性

int32_t num_labels
float64_tlabels

构造及析构函数文档

CLabels (  ) 

default constructor

在文件Labels.cpp25行定义。

CLabels ( int32_t  num_labels  ) 

constructor

参数:
num_labels number of labels

在文件Labels.cpp32行定义。

CLabels ( float64_t src,
int32_t  len 
)

constructor

参数:
src labels to set
len number of labels

在文件Labels.cpp40行定义。

CLabels ( char *  fname  ) 

constructor

参数:
fname filename to load labels from

在文件Labels.cpp49行定义。

~CLabels (  )  [virtual]

在文件Labels.cpp58行定义。


成员函数文档

int32_t get_int_label ( int32_t  idx  ) 

get INT label

参数:
idx index of label to get
返回:
INT value of label

在文件Labels.h118行定义。

int32_t * get_int_labels ( int32_t &  len  ) 

get INT label vector caller has to clean up

参数:
len number of labels to get
返回:
INT labels

在文件Labels.cpp142行定义。

float64_t get_label ( int32_t  idx  ) 

get label

参数:
idx index of label to get
返回:
value of label

在文件Labels.h105行定义。

void get_labels ( float64_t **  dst,
int32_t *  len 
)

get labels (swig compatible)

参数:
dst where labels will be stored in
len where number of labels will be stored in

在文件Labels.cpp127行定义。

float64_t * get_labels ( int32_t &  len  ) 

get labels caller has to clean up

参数:
len number of labels
返回:
the labels

在文件Labels.cpp112行定义。

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

实现了CSGObject

在文件Labels.h188行定义。

int32_t get_num_classes (  ) 

return number of classes (for multiclass) labels have to be zero based 0,1,...C missing labels are illegal

返回:
number of classes

在文件Labels.cpp98行定义。

int32_t get_num_labels (  ) 

get number of labels

返回:
number of labels

在文件Labels.h185行定义。

bool is_two_class_labeling (  ) 

is two-class labeling

返回:
if this is two-class labeling

在文件Labels.cpp74行定义。

bool load ( char *  fname  ) 

load labels from file

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

在文件Labels.cpp167行定义。

bool save ( char *  fname  ) 

save labels to file

参数:
fname filename to save to
返回:
if saving was successful

在文件Labels.cpp191行定义。

bool set_int_label ( int32_t  idx,
int32_t  label 
)

set INT label

参数:
idx index of label to set
label INT value of label
返回:
if setting was successful

在文件Labels.h89行定义。

void set_int_labels ( int32_t *  labels,
int32_t  len 
)

set INT labels caller has to clean up

参数:
labels INT labels
len number of INT labels

在文件Labels.cpp157行定义。

bool set_label ( int32_t  idx,
float64_t  label 
)

set label

参数:
idx index of label to set
label value of label
返回:
if setting was successful

在文件Labels.h72行定义。

void set_labels ( float64_t src,
int32_t  len 
)

set labels

参数:
src labels to set
len number of labels

在文件Labels.cpp65行定义。


成员数据文档

float64_t* labels [protected]

the labels

在文件Labels.h275行定义。

int32_t num_labels [protected]

number of labels

在文件Labels.h273行定义。


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

SHOGUN Machine Learning Toolbox - Documentation