Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_precision_recall(b_mb, margin):
b, mb = b_mb
p, r = precision_recall(b, mb, margin=margin)
assert 0 <= p < 1
assert 0 <= r < 1
p, r = precision_recall(b, b, margin=margin)
assert (p, r) == (1, 1)
p, r = precision_recall(b, [b[-1]], margin=margin)
def test_precision_recall(b_mb, margin):
b, mb = b_mb
p, r = precision_recall(b, mb, margin=margin)
assert 0 <= p < 1
assert 0 <= r < 1
p, r = precision_recall(b, b, margin=margin)
assert (p, r) == (1, 1)
p, r = precision_recall(b, [b[-1]], margin=margin)
def test_precision_recall(b_mb, margin):
b, mb = b_mb
p, r = precision_recall(b, mb, margin=margin)
assert 0 <= p < 1
assert 0 <= r < 1
p, r = precision_recall(b, b, margin=margin)
assert (p, r) == (1, 1)
p, r = precision_recall(b, [b[-1]], margin=margin)