Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Issue #4028: Fix ROC Evaluation Messages #4042

Merged
merged 3 commits into from
Dec 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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