45 bool in_uniq, is_contiguous =
true;
49 long *uniq_y =
Calloc(
long, K);
50 uniq_y[0] = data->
y[0];
52 for (i=1; i<data->
n; i++) {
55 if (uniq_y[j] == data->
y[i]) {
62 uniq_y =
Realloc(uniq_y,
long, K+1);
63 uniq_y[K++] = data->
y[i];
70 if (min_y < 1 || max_y > K) {
71 is_contiguous =
false;
#define Calloc(type, size)
long K
number of classes for the workspace
Header file for gensvm_checks.c.
long * y
array of class labels, 1..K
A structure to represent the data.
#define Realloc(var, type, size)
bool gensvm_check_outcome_contiguous(struct GenData *data)
Check if the labels are contiguous on [1 .. K].
long n
number of instances