Skip to content
DeepForgeby svx
All problems
MediumML Fundamentalsml-357

Feedback Loop Amplification

Problem

Estimate one step of feedback-loop amplification. Form next exposure as exposure_i * score_i normalized to sum to 1, then return the ratio of the largest next exposure share to the largest current exposure share. Return 0.0 when the input is empty or the relevant totals are 0.

Hint

Training on data generated by the current model can amplify whatever it already over-exposes.

Test cases

case 1
in: [[0.5,0.3,0.2],[1,2,3]]
expected: 0.7058823529411765
case 2
in: [[0.2,0.3,0.5],[3,2,1]]
expected: 0.7058823529411765
case 3
in: [[0.1,0.2,0.7],[1,1,1]]
expected: 1
case 4
in: [[],[]]
expected: 0
case 5
in: [[0.5,0.5],[0,0]]
expected: 0
Starter codePython
def feedback_amplification(exposure, scores):
    # Your code here
    pass

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