Skip to content
DeepForgeby svx
All problems
EasyComputer Visioncv-270

Vision Fairness Gap

Problem

Compute the fairness gap between demographic groups.

Return the difference between the highest and lowest group accuracy, rounded to 4 decimal places.

Test cases

case 1
in: [[0.8,0.75,0.9]]
expected: 0.15
case 2
in: [[0.6,0.6]]
expected: 0
case 3
in: [[0.3,0.5,0.45,0.7]]
expected: 0.4
Starter codePython
def fairness_gap(group_accuracies):
    # Your code here
    pass

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