MCPcopy Create free account
hub / github.com/davisking/dlib / perform_test

Method perform_test

dlib/test/active_learning.cpp:142–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140 {}
141
142 void perform_test (
143 )
144 {
145 std::vector<sample_type> samples;
146 std::vector<double> labels;
147 print_spinner();
148 make_dataset(samples, labels);
149 dlog << LINFO << "samples.size(): "<< samples.size();
150
151 // When we pick the best/front ranked element then the active learning method
152 // shouldn't do much worse than random selection (and often much better).
153 DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, max_min_margin, 35, true) >= 0.97);
154 DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, ratio_margin, 25, true) >= 0.96);
155 // However, picking the worst ranked element should do way worse than random
156 // selection.
157 DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, max_min_margin, 25, false) < 0.8);
158 DLIB_TEST(test_rank_unlabeled_training_samples(samples, labels, ratio_margin, 25, false) < 0.8);
159 }
160 } a;
161
162}

Callers

nothing calls this directly

Calls 4

print_spinnerFunction · 0.85
make_datasetFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected