Skip to content

generalize to sgd with mini batches #93

@dustinvtran

Description

@dustinvtran

From an e-mail exchange with Kamal Hamidieh:

First of all, thank you for the SGD package. Just a quick question: Is there a setting in the command sgd where I can force sgd to perform batch gradient descent? I know the purpose of the package is to do the stochastic version but I like to know if this is possible.

gradient always does data subsampling with one data point, e.g., see below:

https://github.com/airoldilab/sgd/blob/master/src/model/glm_model.h#L44

the gradient function can be generalized to do mini batches. alternatively, another way to write it is to write the mini-batch loop in the sgd methods:

https://github.com/airoldilab/sgd/blob/master/src/sgd/explicit_sgd.h#L25

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions