Write a program using tensorflow to build a stochastic gradient descent model for linear regression

Part 1

  1. Co-effiecients m &c for y=mx+c are calculated for given values from previous assignment
  2. Start with 0 (zero ) value for m & c .
  3. Using cost function $$J(\beta) = \frac{1}{2m}\sum_{i=1}^m(h_\beta(x^{(i)})-y^{(i)})^2$$ where $(h_\beta(x^{(i)})$ is prediction for present iteration $y^{(i)}$ is the prediction obtained from y=mx+c value
  4. Find the values of m & c by updating the values with learning rate of 0.005, 0.0005 etc and epoch value 100,500,1000

Part 2

  1. Display the graph of decreasing cost function wrt learning rate and epoch
  2. Compare time complexity of tensorflow api and user defined function
  3. Start with random values of m & c . Analyse best approach for initial values of m & c.