Made tests more robust

This commit is contained in:
Davis King 2012-12-27 14:43:13 -05:00
parent 43d9768ecc
commit 892fa86c46
1 changed files with 5 additions and 5 deletions

View File

@ -149,13 +149,13 @@ namespace
dlog << LINFO << "samples.size(): "<< samples.size();
// When we pick the best/front ranked element then the active learning method
// should do at least as well as random selection.
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, max_min_margin, 30, true) >= 1);
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, ratio_margin, 30, true) >= 1);
// shouldn't do much worse than random selection (and often much better).
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, max_min_margin, 25, true) >= 0.97);
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, ratio_margin, 25, true) >= 0.97);
// However, picking the worst ranked element should do way worse than random
// selection.
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, max_min_margin, 30, false) < 1);
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, ratio_margin, 30, false) < 1);
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, max_min_margin, 25, false) < 0.8);
DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, ratio_margin, 25, false) < 0.8);
}
} a;