Skip to content
DeepForgeby svx
All problems
MediumOptimizationop-149

Nesterov Rate Value

Problem

Evaluate the Nesterov accelerated convergence rate after t iterations.

Return (1 - sqrt(mu / L)) ** t, clamping the base at 0 when it would be negative. Return 0.0 when mu or L is not positive.

Hint

Acceleration replaces the condition number by its square root.

Test cases

case 1
in: [1,4,10]
expected: 0.0009765625
case 2
in: [0.25,1,5]
expected: 0.03125
case 3
in: [1,100,3]
expected: 0.7290000000000001
case 4
in: [0,1,5]
expected: 0
Starter codePython
def nesterov_rate_value(mu, L, t):
    # Your code here
    pass

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