All problems
Descent Lemma Bound
Problem
Evaluate the descent lemma upper bound for a scalar step.
Return f_x + grad * delta + 0.5 * L * delta ** 2, where L is the gradient Lipschitz constant. This bounds f at the new point along the gradient direction.
Hint
The quadratic penalty 0.5 * L * delta ** 2 upper-bounds the curvature term.
Test cases
case 1
in: [1,2,0.1,4]
expected: 1.22
case 2
in: [0,-1,0.5,2]
expected: -0.25
case 3
in: [3,0,1,10]
expected: 8
case 4
in: [2,1,-0.5,4]
expected: 2
Starter codePython
def descent_lemma_bound(f_x, grad, delta, L):
# Your code here
pass4 test cases · run your code against them in the editor