Implement the gradient descent

Assignment Help Computer Engineering
Reference no: EM132995790

Question 1. Rewrite the objective in the form

f(x) = 1/2n ||y - Ax||2

where A is the data matrix and n is the number of data points.

Question 2. Implement the gradient descent (GD) method which consists of the iter- ations:

xk+1 = xk - αk∇f(xk)

where

∇f(x) = -1/n AT(y - Ax).

where we choose αk = a > 0 for some constant a. Tune your algorithm to different values of a. You can stop your algorithm when ||∇(x)|| ≤ ε with ε = 10-2. For which values of a, do you see divergence or convergence in your algorithm?

How close is the solution you compute with GD is to the actual solution
x = [x1, x2, x3 ] where x = (AT A)-1AT y?

Question 3. Plot the level sets of the objective f(x1, x2, x3) when x1 = x∗1. In other words, plot the level sets of f(x1∗ , x2, x3) versus x2 and x3. Mark the iterates of gradient descent on the level set plots and verify that gradient descent moves perpendicular to the level sets. Visualize the function f(x1∗ , x2, x3) in 3D as a function of x2 and x3. Does it look like a "cereal bowl"?

Question 4. Repeat the previous question with different choise of the stepsize αk in your implementation

(a) αk = a > 0 is a constant. How does the performance change when we vary a? For which values of a, do you see divergence or convergence? How large a should be for you to observe divergence of the GD?
(b) Repeat part (a) with αk = a/k varying the values of a.
(c) Repeat part (a) with αk = a/√k. Based on these experiments, what is the best stepsize rule in your opinion to get the best performance?

Question 5. Note that

f(x) = X f where f = 1 (y - aT x)2

is the loss of the data point i where aT is the i-th row of the data matrix

A. Note that each row comes from a single data point and the gradient of fi is

∇fi(x) = -ai (yi - ai x).

At step k, choose a data point index ik uniformly randomly from the set of all indices {1, 2, . . . , n} and consider the iterations

xk+1 = xk - αk∇fik (xk)

where the replace the gradient in the GD method with a random estimate of it; i.e. ∇fik . This is called the stochastic gradient method (SGD).

Repeat questions 3) and 4) for stochastic gradient descent. Can SGD be faster than GD for different values of target accuracy ε = 10-1, 10-2, 10-3, . . . etc? Please explain.

Attachment:- Question.rar

Reference no: EM132995790

Questions Cloud

What is the value of the firm under each plan : -If the shareholders require a 15% return before personal taxes, what is the value of the firm under each plan? (Do not ignore personal taxes)
What is the internal revenue service key customer data : What is the Internal Revenue Service Key Customer Data, in terms of Product/service, market segment, buying from the competition
What would be the incremental cash flow : What would be the incremental cash flow in Year 4 from leasing instead of purchasing if the purchased asset had a pretax salvage value of $900
Compute the net income under Matthew proposal : Matthew quoted an old marketing research report that said that sales volume would increase by 60%. Compute the net income under Matthew proposal
Implement the gradient descent : Implement the gradient descent - How close is the solution you compute with GD is to the actual solution
What is Gagah weighted average cost of capital : Gagah Motors Enterprise., a producer of turbine generators, is in this situation: EBIT = RM4 million, What is Gagah weighted average cost of capital
What could be the net realizable value of an inventory : Assume the damaged merchandise that had cost of BR 3500 can be sold for only 3000 direct costs, what could be the net realizable value of an inventory
Is the market for Gold - Copper efficient : The next trade of the share takes place at 10.45 am at $2 per share. Is the market for Gold & Copper efficient? Why or why not
Determine the optimal order quantity : The chemical is purchased 10 kilogram canisters for $95 each. The firm 2 uses 4 800 canisters per year. Determine the optimal order quantity

Reviews

len2995790

9/22/2021 9:31:39 PM

gradient descent and stochastic gradient descent methods to solve the regression problems.

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd