Skip to content

The Stochastic Gradient Descent and Mini-batch gradient descent #4

Description

@frameproject

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions