Question: 4 Gradient Continue with the last problem in assignment 1, in this problem you should do the samething within a function. The data could from

4 Gradient Continue with the last problem in assignment 1, in this problem you should do the samething within a function. The data could from last problem in assignment

1.Define a function gradientdescent()1. with 6 arguments, x, y, m, c, epochs(number of iterations), and L(learning rate, setthis a default value with 0.001)

.2. Return m and c as a result

3. Try to input different number of iterations, 200, 500, 1000, 2000,3000, see thedifference among results. (this step doesnt need code)

4.1 Function requirementfunction name: gradient_descentinput :String s, Integer koutput: Tuple of floats, for example: (m, c)

Please write in python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!