diff --git a/src/shogun/evaluation/ROCEvaluation.cpp b/src/shogun/evaluation/ROCEvaluation.cpp index 2e6f7da733d..f4ddca50c5b 100644 --- a/src/shogun/evaluation/ROCEvaluation.cpp +++ b/src/shogun/evaluation/ROCEvaluation.cpp @@ -19,8 +19,16 @@ CROCEvaluation::~CROCEvaluation() float64_t CROCEvaluation::evaluate(CLabels* predicted, CLabels* ground_truth) { - REQUIRE(predicted->get_label_type()==LT_BINARY, "ROC evalution requires binary labels."); - REQUIRE(ground_truth->get_label_type()==LT_BINARY, "ROC evalution requires binary labels."); + REQUIRE(predicted, "No predicted labels provided.\n"); + REQUIRE(ground_truth, "No ground truth labels provided.\n"); + REQUIRE( + predicted->get_label_type() == LT_BINARY, + "Given predicted labels (%d) must be binary (%d).\n", + predicted->get_label_type(), LT_BINARY); + REQUIRE( + ground_truth->get_label_type() == LT_BINARY, + "Given ground truth labels (%d) must be binary (%d).\n", + ground_truth->get_label_type(), LT_BINARY); return evaluate_roc((CBinaryLabels*)predicted,(CBinaryLabels*)ground_truth); }