Skip to content
DeepForgeby svx
All problems
MediumComputer Visioncv-289

Confident Learning Prune

Problem

Prune likely-mislabeled samples by their probability for the given label.

For sample i take p = probs[i][labels[i]] and keep the sample when p >= threshold. Return the kept indices in ascending order.

Test cases

case 1
in: [[[0.9,0.1],[0.2,0.8],[0.4,0.5]],[0,1,1],0.5]
expected: [0,1,2]
case 2
in: [[[0.9,0.1],[0.2,0.8]],[0,1],0.5]
expected: [0,1]
case 3
in: [[[0.1,0.9]],[0],0.5]
expected: []
Starter codePython
def prune_noisy(probs, labels, threshold):
    # Your code here
    pass

3 test cases · run your code against them in the editor