21 using namespace shogun;
49 for (int32_t i=0; i<subset_size; i++)
82 SG_ERROR(
"A subset is set, cannot set labels\n");
92 bool found_plus_one=
false;
93 bool found_minus_one=
false;
96 for (int32_t i=0; i<subset_size; i++)
102 found_minus_one=
true;
105 SG_ERROR(
"Not a two class labeling label[%d]=%f (only +1/-1 "
111 SG_ERROR(
"Not a two class labeling - no positively labeled examples found\n");
112 if (!found_minus_one)
113 SG_ERROR(
"Not a two class labeling - no negatively labeled examples found\n");
137 memcpy(result.vector, classes->
get_array(),
147 SG_ERROR(
"get_labels() is not possible on subset");
165 SG_ERROR(
"set_int_labels() is not possible on subset");
170 for (int32_t i=0; i<lab.
vlen; i++)
190 SG_ERROR(
"save() is not possible on subset");
bool set_int_label(int32_t idx, int32_t label)
class for adding subset support to a class. Provides an interface for getting/setting subset_matrices...
bool set_label(int32_t idx, float64_t label)
SGVector< float64_t > get_labels()
SGVector< float64_t > get_classes()
const index_t get_size() const
void set_int_labels(SGVector< int32_t > labels)
int32_t get_int_label(int32_t idx)
void add(bool *param, const char *name, const char *description="")
void set_labels(SGVector< float64_t > v)
virtual void set_subset(CSubset *subset)
virtual void free_vector()
SGVector< int32_t > get_int_labels()
Class SGObject is the base class of all shogun objects.
virtual void get_vector(bool *&vector, int32_t &len)
virtual void destroy_vector()
SGVector< float64_t > labels
float64_t get_label(int32_t idx)
virtual void remove_subset()
A File access base class.
virtual void load(CFile *loader)
bool is_two_class_labeling()
int32_t get_num_classes()
index_t subset_idx_conversion(index_t idx) const
index_t subset_idx_conversion(index_t idx) const
int32_t get_num_elements() const
virtual void set_vector(const bool *vector, int32_t len)
virtual void save(CFile *writer)