CLabels Class Reference
Detailed Description
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.
Definition at line 26 of file Labels.h.
List of all members.
Constructor & Destructor Documentation
default constructor
Definition at line 25 of file Labels.cpp.
constructor
- Parameters:
-
| num_labels | number of labels |
Definition at line 32 of file Labels.cpp.
constructor
- Parameters:
-
| src | labels to set |
| len | number of labels |
Definition at line 40 of file Labels.cpp.
constructor
- Parameters:
-
| fname | filename to load labels from |
Definition at line 49 of file Labels.cpp.
Member Function Documentation
int32_t get_int_label |
( |
int32_t |
idx |
) |
|
get INT label
- Parameters:
-
| idx | index of label to get |
- Returns:
- INT value of label
Definition at line 118 of file Labels.h.
int32_t * get_int_labels |
( |
int32_t & |
len |
) |
|
get INT label vector caller has to clean up
- Parameters:
-
| len | number of labels to get |
- Returns:
- INT labels
Definition at line 142 of file Labels.cpp.
get label
- Parameters:
-
| idx | index of label to get |
- Returns:
- value of label
Definition at line 105 of file Labels.h.
void get_labels |
( |
float64_t ** |
dst, |
|
|
int32_t * |
len | |
|
) |
| | |
get labels (swig compatible)
- Parameters:
-
| dst | where labels will be stored in |
| len | where number of labels will be stored in |
Definition at line 127 of file Labels.cpp.
get labels caller has to clean up
- Parameters:
-
- Returns:
- the labels
Definition at line 112 of file Labels.cpp.
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
- Returns:
- number of classes
Definition at line 98 of file Labels.cpp.
int32_t get_num_labels |
( |
|
) |
|
get number of labels
- Returns:
- number of labels
Definition at line 185 of file Labels.h.
bool is_two_class_labeling |
( |
|
) |
|
is two-class labeling
- Returns:
- if this is two-class labeling
Definition at line 74 of file Labels.cpp.
bool load |
( |
char * |
fname |
) |
|
load labels from file
- Parameters:
-
| fname | filename to load from |
- Returns:
- if loading was successful
Definition at line 167 of file Labels.cpp.
bool save |
( |
char * |
fname |
) |
|
save labels to file
- Parameters:
-
| fname | filename to save to |
- Returns:
- if saving was successful
Definition at line 191 of file Labels.cpp.
bool set_int_label |
( |
int32_t |
idx, |
|
|
int32_t |
label | |
|
) |
| | |
set INT label
- Parameters:
-
| idx | index of label to set |
| label | INT value of label |
- Returns:
- if setting was successful
Definition at line 89 of file Labels.h.
void set_int_labels |
( |
int32_t * |
labels, |
|
|
int32_t |
len | |
|
) |
| | |
set INT labels caller has to clean up
- Parameters:
-
| labels | INT labels |
| len | number of INT labels |
Definition at line 157 of file Labels.cpp.
bool set_label |
( |
int32_t |
idx, |
|
|
float64_t |
label | |
|
) |
| | |
set label
- Parameters:
-
| idx | index of label to set |
| label | value of label |
- Returns:
- if setting was successful
Definition at line 72 of file Labels.h.
void set_labels |
( |
float64_t * |
src, |
|
|
int32_t |
len | |
|
) |
| | |
set labels
- Parameters:
-
| src | labels to set |
| len | number of labels |
Definition at line 65 of file Labels.cpp.
Member Data Documentation
number of labels
Definition at line 273 of file Labels.h.
The documentation for this class was generated from the following files: