Public Member Functions | |
CLabels () | |
CLabels (int32_t num_labels) | |
CLabels (float64_t *labels, int32_t len) | |
CLabels (char *fname) | |
~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_t * | get_labels (int32_t &len) |
void | get_labels (float64_t **labels, int32_t *len) |
void | set_labels (float64_t *labels, 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 () |
Protected Attributes | |
int32_t | num_labels |
float64_t * | labels |
Definition at line 23 of file Labels.h.
CLabels::CLabels | ( | ) |
default constructor
Definition at line 18 of file Labels.cpp.
CLabels::CLabels | ( | int32_t | num_labels | ) |
CLabels::CLabels | ( | float64_t * | labels, | |
int32_t | len | |||
) |
constructor
labels | labels to set | |
len | number of labels |
Definition at line 33 of file Labels.cpp.
CLabels::CLabels | ( | char * | fname | ) |
constructor
fname | filename to load labels from |
Definition at line 42 of file Labels.cpp.
CLabels::~CLabels | ( | ) |
Definition at line 51 of file Labels.cpp.
int32_t CLabels::get_int_label | ( | int32_t | idx | ) |
int32_t * CLabels::get_int_labels | ( | int32_t & | len | ) |
get INT label vector caller has to clean up
len | number of labels to get |
Definition at line 129 of file Labels.cpp.
float64_t CLabels::get_label | ( | int32_t | idx | ) |
void CLabels::get_labels | ( | float64_t ** | labels, | |
int32_t * | len | |||
) |
get labels (swig compatible)
labels | where labels will be stored in | |
len | where number of labels will be stored in |
Definition at line 114 of file Labels.cpp.
float64_t * CLabels::get_labels | ( | int32_t & | len | ) |
get labels caller has to clean up
len | number of labels |
Definition at line 99 of file Labels.cpp.
int32_t CLabels::get_num_classes | ( | ) |
return number of classes (for multiclass) labels have to be zero based 0,1,...C missing labels are illegal
Definition at line 85 of file Labels.cpp.
int32_t CLabels::get_num_labels | ( | ) |
bool CLabels::is_two_class_labeling | ( | ) |
is two-class labeling
Definition at line 70 of file Labels.cpp.
bool CLabels::load | ( | char * | fname | ) |
load labels from file
fname | filename to load from |
Definition at line 154 of file Labels.cpp.
bool CLabels::save | ( | char * | fname | ) |
save labels to file
fname | filename to save to |
Definition at line 178 of file Labels.cpp.
bool CLabels::set_int_label | ( | int32_t | idx, | |
int32_t | label | |||
) |
void CLabels::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 |
Definition at line 144 of file Labels.cpp.
bool CLabels::set_label | ( | int32_t | idx, | |
float64_t | label | |||
) |
void CLabels::set_labels | ( | float64_t * | labels, | |
int32_t | len | |||
) |
set labels
labels | labels to set | |
len | number of labels |
Definition at line 58 of file Labels.cpp.
float64_t* CLabels::labels [protected] |
int32_t CLabels::num_labels [protected] |