Implement vanilla gradient descent to minimize a 1-D quadratic:
f(x)=ax2+bx+cInput: a = 1, b = -4, c = 3, x0 = 0, lr = 0.1, steps = 50
Output: ≈ 2.0
Input: a = 0.5, b = -1, c = 0, x0 = -5, lr = 0.2, steps = 100
Output: ≈ 1.0
Use a loop to update x repeatedly.
steps times (where lr is the learning rate)Sign in to take notes on this problem
Accepts: number
Accepts: number
Accepts: number
Accepts: number
Accepts: number
Accepts: number
Implement vanilla gradient descent to minimize a 1-D quadratic:
f(x)=ax2+bx+cInput: a = 1, b = -4, c = 3, x0 = 0, lr = 0.1, steps = 50
Output: ≈ 2.0
Input: a = 0.5, b = -1, c = 0, x0 = -5, lr = 0.2, steps = 100
Output: ≈ 1.0
Use a loop to update x repeatedly.
steps times (where lr is the learning rate)Sign in to take notes on this problem
Accepts: number
Accepts: number
Accepts: number
Accepts: number
Accepts: number
Accepts: number