def test_metric_count(distance_matrix, conformity_matrix, topk, expected): """Simple test""" out = cmc_score_count( distances=distance_matrix, conformity_matrix=conformity_matrix, topk=topk, ) assert np.isclose(out, expected)
def test_metric_greater(distance_matrix, conformity_matrix, topk, expected): """Simple test""" out = cmc_score_count( distances=distance_matrix, conformity_matrix=conformity_matrix, topk=topk, ) assert out + EPS >= expected
def test_metric_less(distance_matrix, conformity_matrix, topk, expected): """Simple test""" out = cmc_score_count(distances=distance_matrix, conformity_matrix=conformity_matrix, topk=topk) assert out - EPS <= expected