All problems
Recall from Counts
Problem
Recall (sensitivity) is TP / (TP + FN), the fraction of true positives found. Return 0.0 when the denominator is zero.
Given the counts, return the recall.
Hint
It answers: of the real positives, how many were found?
Test cases
case 1
in: [8,2]
expected: 0.8
case 2
in: [0,4]
expected: 0
case 3
in: [5,0]
expected: 1
Starter codePython
def recall_from_counts(tp, fn):
# Your code here
pass3 test cases · run your code against them in the editor