title: How cost function curve is actually calculated for gradient descent i:e how many times the model chooses the weights randomly?
body: <p>As far as I know, to calculate the weights and bias for simple linear regression, it follows gradient descent algorithm which works on finding global minima for cost function(curve). And that cost function is calculated by randomly choosing a set of weights and then calculating mean error  on all the records. In that way we get a point on the cost curve. Again another set of weights are chosen and mean error is calculated. So all these points make up the cost curve.
  My doubt is, how many times the weights are randomly chosen to get the points, before calculating (finding the cost function)the cost curve.
  Thanks in advance.</p>