airoldilab / sgd

An R package for large scale estimation with stochastic gradient descent
62 stars 18 forks source link

clarify how to stream data to sgd #100

Open alexanderchernyakovgithub opened 7 years ago

alexanderchernyakovgithub commented 7 years ago

I noticed in the vignette it alludes to being able to stream data to sgd via bigmemory but I can't seem to find any examples of how to do this. Could you please provide some in the docs?

TravisDunlop commented 7 years ago

I am trying to do something similar (only with ffdf). Currently, I'm trying to break the data into chunks, calling sgd on each chunk and passing the output as the starting value for the next chunk. But it doesn't converge to the same solution as when I call sgd on the whole data all at once. I think it's because the learning rate resets with each call to sgd. However, even with setting lr and lr.control I don't see a way to pass the learning rate onto the next chunk. I would try and code it myself if I knew C++!