All problems
Robbins-Monro Schedule
Problem
Evaluate the Robbins-Monro gain at iteration k.
Return a / (k + c), a classic diminishing step-size sequence for stochastic root finding.
Hint
The gain is harmonic in k.
Test cases
case 1
in: [1,1,0]
expected: 1
case 2
in: [1,1,9]
expected: 0.1
case 3
in: [0.5,2,3]
expected: 0.1
case 4
in: [2,0,4]
expected: 0.5
Starter codePython
def robbins_monro_schedule(a, c, k):
# Your code here
pass4 test cases · run your code against them in the editor