5 using namespace shogun;
15 #if !defined(SWIGJAVA) && !defined(SWIGCSHARP)
19 for (int32_t i=0; i<values.
vlen; i++)
28 for (int32_t i=0; i<values.
vlen; i++)
38 for (int32_t i=0; i<labels.
vlen; i++)
39 labels[i] = src[i]+threshold>=0 ? +1.0 : -1.0;
51 bool found_plus_one=
false;
52 bool found_minus_one=
false;
55 for (int32_t i=0; i<subset_size; i++)
65 "%s%s%s::ensure_valid(): Not a two class labeling label[%d]=%f (only +1/-1 "
66 "allowed)\n", context ? context :
"",
74 "%s%s%s::ensure_valid(): Not a two class labeling - no positively labeled examples found\n",
75 context ? context :
"", context ?
": " :
"",
get_name());
81 "%s%s%s::ensure_valid): Not a two class labeling - no negatively labeled examples found\n",
82 context ? context :
"", context ?
": " :
"",
get_name());
93 SG_DEBUG(
"entering CBinaryLabels::scores_to_probabilities()\n")
106 SG_DEBUG(
"using sigmoid: a=%f, b=%f\n", a, b)
116 SG_DEBUG(
"leaving CBinaryLabels::scores_to_probabilities()\n")
SGVector< float64_t > m_labels
void set_int_labels(SGVector< int32_t > labels)
virtual int32_t get_num_labels() const
CSubsetStack * m_subset_stack
static SigmoidParamters fit_sigmoid(SGVector< float64_t > scores)
A File access base class.
index_t subset_idx_conversion(index_t idx) const
virtual void ensure_valid(const char *context=NULL)
virtual const char * get_name() const
virtual void ensure_valid(const char *context=NULL)
static float64_t exp(float64_t x)
void scores_to_probabilities(float64_t a=0, float64_t b=0)
SGVector< float64_t > m_current_values
Dense integer or floating point labels.
virtual void set_values(SGVector< float64_t > values)
void set_labels(SGVector< float64_t > v)
virtual ELabelType get_label_type() const