hello Aurélien,
From https://github.com/amitanalyste/aurelienGeron/blob/master/04_training_linear_models.ipynb
The Stochastic Gradient Descent and Mini-batch gradient descent you use :
gradients = 2 * xi.T.dot(xi.dot(theta) - yi)
it gives a good result but the cost function should be:
gradients = 2/m * xi.T.dot(xi.dot(theta) - yi)
then you use this function for :
Linear regression using batch gradient descent and :
gradients = 2/m * X_b.T.dot(X_b.dot(theta) - y)
What are the differences ?
Many thanks
Frederic
hello Aurélien,
From https://github.com/amitanalyste/aurelienGeron/blob/master/04_training_linear_models.ipynb
The Stochastic Gradient Descent and Mini-batch gradient descent you use :
it gives a good result but the cost function should be:
then you use this function for :
Linear regression using batch gradient descent and :
What are the differences ?
Many thanks
Frederic