Question: 2. (30 points) Complete the gradient descent optimizers (gradient descent and stochastic gradi- ent descent). Use the code to conduct the following experiments: (a)
2. (30 points) Complete the gradient descent optimizers (gradient descent and stochastic gradi- ent descent). Use the code to conduct the following experiments: (a) (15 points) Implement ridge regression using the gradient descent optimizer. Apply gradient descent based ridge regression using a random dataset with N = 1000 and d = 50, and plot the objective changes at each iteration. (b) (15 points) Apply stochastic gradient descent using the batch sizes n = 5, 10, 100, 500 and for each batch size, plot the objective changes at each iteration.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
