详细描述
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.h第30行定义。
所有成员的列表。
公有成员 |
| 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_t * | get_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_t * | get_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_t * | get_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_t * | labels |
int16_t | m_num_classes |
float64_t * | m_confidences |
构造及析构函数文档
constructor
- 参数:
-
num_labels | number of labels |
在文件Labels.cpp第34行定义。
constructor
- 参数:
-
src | labels to set |
len | number of labels |
在文件Labels.cpp第45行定义。
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.cpp第59行定义。
constructor
- 参数:
-
loader | File object via which to load data |
在文件Labels.cpp第72行定义。
成员函数文档
void find_labels |
( |
) |
[protected] |
find labels from the confidences using argmax over the classes.
在文件Labels.cpp第173行定义。
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.cpp第125行定义。
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.cpp第138行定义。
int32_t get_int_label |
( |
int32_t |
idx ) |
|
get INT label
- 参数:
-
- 返回:
- INT value of label
在文件Labels.h第127行定义。
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.cpp第264行定义。
get labels caller has to clean up
- 参数:
-
- 返回:
- the labels
在文件Labels.cpp第234行定义。
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.cpp第249行定义。
virtual const char* get_name |
( |
) |
const [virtual] |
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.cpp第220行定义。
int32_t get_num_labels |
( |
) |
|
get number of labels
- 返回:
- number of labels
在文件Labels.h第222行定义。
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.cpp第154行定义。
bool is_two_class_labeling |
( |
) |
|
is two-class labeling
- 返回:
- if this is two-class labeling
在文件Labels.cpp第196行定义。
void load |
( |
CFile * |
loader ) |
[virtual] |
load labels from file
- 参数:
-
loader | File object via which to load data |
在文件Labels.cpp第289行定义。
void save |
( |
CFile * |
writer ) |
[virtual] |
save labels to file
- 参数:
-
writer | File object via which to save data |
在文件Labels.cpp第300行定义。
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.cpp第102行定义。
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.h第98行定义。
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.cpp第279行定义。
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.h第81行定义。
void set_labels |
( |
float64_t * |
src, |
|
|
int32_t |
len |
|
) |
| |
set labels
- 参数:
-
src | labels to set |
len | number of labels |
在文件Labels.cpp第93行定义。
成员数据文档
confidence matrix of size: num_classes x num_labels
在文件Labels.h第322行定义。
该类的文档由以下文件生成: