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:
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:
From an e-mail exchange with Kamal Hamidieh:
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