Skip to content

Commit

Permalink
Fix ROC error messages (shogun-toolbox#4042)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckousik authored and ktiefe committed Jul 26, 2019
1 parent ee1adec commit 8d8b2a7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/shogun/evaluation/ROCEvaluation.cpp
Original file line number Diff line number Diff line change
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 8d8b2a7

Please sign in to comment.