List the ROC curve points obtained by using every distinct score as a decision threshold (predict positive when score >= threshold), going from the highest threshold to the lowest. y holds 0/1 labels.
Implement solve(y, scores).
Returns. Return a list of (fpr, tpr) tuples, one per unique score in decreasing order of threshold. The curve's starting point (0,0) is not included. If a class is absent its rate is 0.0.
Example 1
Input:
solve([0, 0, 1, 1], [0.1, 0.4, 0.35, 0.8])
Output:
[(0.0, 0.5), (0.5, 0.5), (0.5, 1.0), (1.0, 1.0)]
Example 2
Input:
solve([0, 1], [0.5, 0.5])
Output:
[(1.0, 1.0)]
No results yet
Run your code to check it against the examples, or submit to run every test.