Commit 56f95d3e authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Add more tests

parent 89511eeb
Pipeline #14055 passed with stages
in 15 minutes and 14 seconds
......@@ -174,14 +174,16 @@ def test_obvious_thresholds():
far = round(far, int(M / 10))
frr = round(frr, int(M / 10))
calculated_far_threshold = far_threshold(neg, pos, far)
predicted_far, _ = farfrr(
neg, pos, calculated_far_threshold)
predicted_far, _ = farfrr(neg, pos, calculated_far_threshold)
calculated_frr_threshold = frr_threshold(neg, pos, frr)
_, predicted_frr = farfrr(
neg, pos, calculated_frr_threshold)
_, predicted_frr = farfrr(neg, pos, calculated_frr_threshold)
assert predicted_far <= far, (far, calculated_far_threshold, predicted_far)
assert predicted_frr <= frr, (frr, calculated_frr_threshold, predicted_frr)
assert far - predicted_far <= M / 100., (far, calculated_far_threshold,
predicted_far)
assert frr - predicted_frr <= M / 100., (frr, calculated_frr_threshold,
predicted_frr)
def test_thresholding():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment