公有成员 | 保护成员 | 保护属性

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.h30行定义。

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

所有成员的列表。

公有成员

 CLabels ()
 CLabels (int32_t num_labels)
 CLabels (float64_t *src, int32_t len)
 CLabels (float64_t *in_confidences, int32_t in_num_labels, int32_t in_num_classes)
 CLabels (CFile *loader)
virtual ~CLabels ()
virtual void load (CFile *loader)
virtual void save (CFile *writer)
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)
void set_confidences (float64_t *in_confidences, int32_t in_num_labels, int32_t in_num_classes)
float64_tget_confidences (int32_t &out_num_labels, int32_t &out_num_classes)
void get_confidences (float64_t **dst, int32_t *out_num_labels, int32_t *out_num_classes)
float64_tget_sample_confidences (const int32_t &in_sample_index, int32_t &out_num_classes)
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

保护成员

void find_labels ()

保护属性

int32_t num_labels
float64_tlabels
int16_t m_num_classes
float64_tm_confidences

构造及析构函数文档

CLabels (  ) 

default constructor

在文件Labels.cpp25行定义。

CLabels ( int32_t  num_labels  ) 

constructor

参数:
num_labels number of labels

在文件Labels.cpp34行定义。

CLabels ( float64_t src,
int32_t  len 
)

constructor

参数:
src labels to set
len number of labels

在文件Labels.cpp45行定义。

CLabels ( float64_t in_confidences,
int32_t  in_num_labels,
int32_t  in_num_classes 
)

constructor

参数:
in_confidences confidence matrix to be used to derive the labels
in_num_labels number of labels
in_num_classes number of classes

在文件Labels.cpp59行定义。

CLabels ( CFile loader  ) 

constructor

参数:
loader File object via which to load data

在文件Labels.cpp72行定义。

~CLabels (  )  [virtual]

在文件Labels.cpp83行定义。


成员函数文档

void find_labels (  )  [protected]

find labels from the confidences using argmax over the classes.

在文件Labels.cpp173行定义。

float64_t * get_confidences ( int32_t &  out_num_labels,
int32_t &  out_num_classes 
)

get confidences

参数:
out_num_labels number of labels
out_num_classes number of classes will be written to it
返回:
pointer to the confidences matrix

在文件Labels.cpp125行定义。

void get_confidences ( float64_t **  dst,
int32_t *  out_num_labels,
int32_t *  out_num_classes 
)

get confidences (swig compatible)

参数:
dst pointer to the confidences matrix (returned)
out_num_labels number of labels (returned)
out_num_classes number of classes will be written to it (returned)

在文件Labels.cpp138行定义。

int32_t get_int_label ( int32_t  idx  ) 

get INT label

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

在文件Labels.h127行定义。

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.cpp264行定义。

float64_t get_label ( int32_t  idx  ) 

get label

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

在文件Labels.h114行定义。

float64_t * get_labels ( int32_t &  len  ) 

get labels caller has to clean up

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

在文件Labels.cpp234行定义。

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.cpp249行定义。

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

实现了CSGObject

在文件Labels.h225行定义。

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.cpp220行定义。

int32_t get_num_labels (  ) 

get number of labels

返回:
number of labels

在文件Labels.h222行定义。

float64_t * get_sample_confidences ( const int32_t &  in_sample_index,
int32_t &  out_num_classes 
)

get confidences for a sample

参数:
in_sample_index index of a sample
out_num_classes number of classes will be written to it
返回:
pointer to the confidences vector

在文件Labels.cpp154行定义。

bool is_two_class_labeling (  ) 

is two-class labeling

返回:
if this is two-class labeling

在文件Labels.cpp196行定义。

void load ( CFile loader  )  [virtual]

load labels from file

参数:
loader File object via which to load data

在文件Labels.cpp289行定义。

void save ( CFile writer  )  [virtual]

save labels to file

参数:
writer File object via which to save data

在文件Labels.cpp300行定义。

void set_confidences ( float64_t in_confidences,
int32_t  in_num_labels,
int32_t  in_num_classes 
)

set confidences

参数:
in_confidences confidence matrix to be used to derive the labels
in_num_labels number of labels
in_num_classes number of classes

在文件Labels.cpp102行定义。

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.h98行定义。

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.cpp279行定义。

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.h81行定义。

void set_labels ( float64_t src,
int32_t  len 
)

set labels

参数:
src labels to set
len number of labels

在文件Labels.cpp93行定义。


成员数据文档

float64_t* labels [protected]

the labels

在文件Labels.h316行定义。

float64_t* m_confidences [protected]

confidence matrix of size: num_classes x num_labels

在文件Labels.h322行定义。

int16_t m_num_classes [protected]

number of classes

在文件Labels.h319行定义。

int32_t num_labels [protected]

number of labels

在文件Labels.h314行定义。


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

SHOGUN Machine Learning Toolbox - Documentation