48 SG_INFO(
"setting up AUC maximization\n")
61 for (int32_t i=0; i<int_labels.
vlen; i++)
63 if (int_labels.
vector[i]==1)
70 int32_t num_auc = num_pos*num_neg;
71 SG_INFO(
"num_pos: %i num_neg: %i num_auc: %i\n", num_pos, num_neg, num_auc)
74 int32_t* labels_auc = SG_MALLOC(int32_t, num_auc);
77 for (int32_t i=0; i<int_labels.
vlen; i++)
79 if (int_labels.
vector[i]!=1)
82 for (int32_t j=0; j<int_labels.
vlen; j++)
84 if (int_labels.
vector[j]!=-1)
90 features_auc.
matrix[n*2]=i;
91 features_auc.
matrix[n*2+1]=j;
96 features_auc.
matrix[n*2]=j;
97 features_auc.
matrix[n*2+1]=i;
126 CDotKernel::init(l, r);
145 int32_t idx_a1=avec[0], idx_a2=avec[1], idx_b1=bvec[0], idx_b2=bvec[1];
virtual ELabelType get_label_type() const =0
void set_int_labels(SGVector< int32_t > labels)
The class Labels models labels, i.e. class assignments of objects.
void set_feature_matrix(SGMatrix< ST > matrix)
CLabels * setup_auc_maximization(CLabels *labels)
float64_t kernel(int32_t idx_a, int32_t idx_b)
Template class DotKernel is the base class for kernels working on DotFeatures.
Class SGObject is the base class of all shogun objects.
virtual int32_t get_num_vec_rhs()
virtual bool init_normalizer()
CFeatures * rhs
feature vectors to occur on right hand side
all of classes and functions are contained in the shogun namespace
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
Binary Labels for binary classification.
virtual bool has_features()
virtual void ensure_valid(const char *context=NULL)=0