Skip to content

Commit

Permalink
Fix ROC error messages (#4042)
Browse files Browse the repository at this point in the history
Fixes #4028
  • Loading branch information
ckousik authored and karlnapf committed Dec 23, 2017
1 parent 3f28da4 commit c412bee
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/shogun/evaluation/ROCEvaluation.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit c412bee

Please sign in to comment.