[SOLVED] Python -gradient descent from scratch

30.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

Implementation of gradient descent from scratch along with newton method.

Problem statement:

Consider two functions: f1(x, y) = (x − 2)^2 + (y − 3)^2 and f2(x, y) = (1 − (y − 3))^2 + 20((x + 3) − (y − 3)^2)^2 Starting with (x, y) = (0, 0) run the gradient descent algorithm for each function. Run for T iterations, and report the function value at the end of each step.

• First, run with a fixed learning rate of λ = 0.5

• Second, run with any variant of gradient descent you want. Try to get the smallest function value after T steps.

For f1 you are allowed only T = 10 steps. For f2 you are allowed T = 100 steps.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.