SHOGUN v0.9.0
公有成员 | 保护成员 | 保护属性
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_to_one ()
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
int32_t m_num_classes
float64_tm_confidences
int32_t m_confidence_classes
int32_t m_confidence_labels

构造及析构函数文档

CLabels ( )

default constructor

在文件Labels.cpp21行定义。

CLabels ( int32_t  num_labels)

constructor

参数:
num_labelsnumber of labels

在文件Labels.cpp27行定义。

CLabels ( float64_t src,
int32_t  len 
)

constructor

参数:
srclabels to set
lennumber of labels

在文件Labels.cpp37行定义。

CLabels ( float64_t in_confidences,
int32_t  in_num_labels,
int32_t  in_num_classes 
)

constructor

参数:
in_confidencesconfidence matrix to be used to derive the labels
in_num_labelsnumber of labels
in_num_classesnumber of classes

在文件Labels.cpp60行定义。

CLabels ( CFile loader)

constructor

参数:
loaderFile object via which to load data

在文件Labels.cpp77行定义。

~CLabels ( ) [virtual]

在文件Labels.cpp85行定义。


成员函数文档

void find_labels ( ) [protected]

find labels from the confidences using argmax over the classes.

在文件Labels.cpp197行定义。

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

get confidences

参数:
out_num_labelsnumber of labels
out_num_classesnumber of classes will be written to it
返回:
pointer to the confidences matrix

在文件Labels.cpp149行定义。

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

get confidences (swig compatible)

参数:
dstpointer to the confidences matrix (returned)
out_num_labelsnumber of labels (returned)
out_num_classesnumber of classes will be written to it (returned)

在文件Labels.cpp162行定义。

int32_t get_int_label ( int32_t  idx)

get INT label

参数:
idxindex of label to get
返回:
INT value of label

在文件Labels.h129行定义。

int32_t * get_int_labels ( int32_t &  len)

get INT label vector caller has to clean up

参数:
lennumber of labels to get
返回:
INT labels

在文件Labels.cpp288行定义。

float64_t get_label ( int32_t  idx)

get label

参数:
idxindex of label to get
返回:
value of label

在文件Labels.h116行定义。

float64_t * get_labels ( int32_t &  len)

get labels caller has to clean up

参数:
lennumber of labels
返回:
the labels

在文件Labels.cpp258行定义。

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

get labels (swig compatible)

参数:
dstwhere labels will be stored in
lenwhere number of labels will be stored in

在文件Labels.cpp273行定义。

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

实现了CSGObject

在文件Labels.h231行定义。

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

int32_t get_num_labels ( )

get number of labels

返回:
number of labels

在文件Labels.h228行定义。

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

get confidences for a sample

参数:
in_sample_indexindex of a sample
out_num_classesnumber of classes will be written to it
返回:
pointer to the confidences vector

在文件Labels.cpp178行定义。

bool is_two_class_labeling ( )

is two-class labeling

返回:
if this is two-class labeling

在文件Labels.cpp220行定义。

void load ( CFile loader) [virtual]

load labels from file

参数:
loaderFile object via which to load data

在文件Labels.cpp313行定义。

void save ( CFile writer) [virtual]

save labels to file

参数:
writerFile object via which to save data

在文件Labels.cpp328行定义。

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

set confidences

参数:
in_confidencesconfidence matrix to be used to derive the labels
in_num_labelsnumber of labels
in_num_classesnumber of classes

在文件Labels.cpp124行定义。

bool set_int_label ( int32_t  idx,
int32_t  label 
)

set INT label

参数:
idxindex of label to set
labelINT value of label
返回:
if setting was successful

在文件Labels.h100行定义。

void set_int_labels ( int32_t *  labels,
int32_t  len 
)

set INT labels caller has to clean up

参数:
labelsINT labels
lennumber of INT labels

在文件Labels.cpp303行定义。

bool set_label ( int32_t  idx,
float64_t  label 
)

set label

参数:
idxindex of label to set
labelvalue of label
返回:
if setting was successful

在文件Labels.h83行定义。

void set_labels ( float64_t src,
int32_t  len 
)

set labels

参数:
srclabels to set
lennumber of labels

在文件Labels.cpp115行定义。

void set_to_one ( )

set all labels to +1

在文件Labels.cpp53行定义。


成员数据文档

float64_t* labels [protected]

the labels

在文件Labels.h241行定义。

int32_t m_confidence_classes [protected]

在文件Labels.h248行定义。

int32_t m_confidence_labels [protected]

在文件Labels.h249行定义。

float64_t* m_confidences [protected]

confidence matrix of size: num_classes x num_labels

在文件Labels.h247行定义。

int32_t m_num_classes [protected]

number of classes

在文件Labels.h244行定义。

int32_t num_labels [protected]

number of labels

在文件Labels.h239行定义。


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

SHOGUN Machine Learning Toolbox - Documentation