Skip to content
DeepForgeby svx
All problems
MediumOptimizationop-269

FISTA Momentum Coefficient

Problem

Compute the next FISTA momentum coefficient from the current scalar t_k.

Set t_next = (1 + sqrt(1 + 4 * t_k^2)) / 2 and return [t_next, (t_k - 1) / t_next], the coefficient used to extrapolate the next FISTA iterate. Starting from t_0 = 1 gives the familiar 2/3 style acceleration schedule.

Hint

The sequence approaches momentum 1 as t_k grows.

Test cases

case 1
in: [1]
expected: [1.618033988749895,0]
case 2
in: [2]
expected: [2.5615528128088303,0.3903882032022076]
case 3
in: [0.5]
expected: [1.2071067811865475,-0.4142135623730951]
case 4
in: [10]
expected: [10.512492197250394,0.8561242977525353]
Starter codePython
def fista_momentum(t_k):
    # Returns [t_next, momentum]
    # Your code here
    pass

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