Skip to content
DeepForgeby svx
All problems
MediumOptimizationop-280

Steepest Descent Contraction Ratio

Problem

For a quadratic with smoothness L and strong convexity mu, the steepest descent method contracts the error by ((L - mu) / (L + mu))^2 per iteration.

Given L and mu with L > mu > 0, return this contraction factor.

Hint

It depends only on the condition number through the ratio of L - mu to L + mu.

Test cases

case 1
in: [10,1]
expected: 0.6694214876033059
case 2
in: [4,2]
expected: 0.1111111111111111
case 3
in: [100,50]
expected: 0.1111111111111111
Starter codePython
def steepest_descent_contraction_ratio(l, mu):
    # Your code here
    pass

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