16 using namespace shogun;
20 ASSERT(predicted && ground_truth);
28 for (int32_t i=0; i<length; i++)
37 int32_t total = length;
38 for (int32_t i=0; i<length; i++)
48 SG_DEBUG(
"correct=%d, total=%d, rejected=%d\n",correct,total,length-total);
60 memset(confusion_matrix.
matrix,0,
sizeof(int32_t)*num_classes*num_classes);
61 for (int32_t i=0; i<length; i++)
64 int32_t ground_truth_label = ((
CMulticlassLabels*) ground_truth)->get_int_label(i);
69 confusion_matrix[predicted_label*num_classes+ground_truth_label]++;
71 return confusion_matrix;