def _tp_tpm_pairs(): return _tpm_pairs(lambda r, c: test_tpms._true_positive(r, c))
def _group_tp_tpm_pairs(group_val): return _group_tpm_pairs( group_val, lambda r, c: test_tpms._true_positive(r, c))
def _sensitivity(tpm_pairs): num_tp = sum([test_tpms._true_positive(r, c) for r, c in tpm_pairs]) num_fn = sum([test_tpms._false_negative(r, c) for r, c in tpm_pairs]) return float(num_tp) / (num_tp + num_fn)