sgd icon indicating copy to clipboard operation
sgd copied to clipboard

SGD with arbitrary function for likelihood and gradient

Open EliYannop opened this issue 7 years ago • 1 comments

Is there a way to use the sgd package for a maximum likelihood estimation that does not fit into one of the statistical families? . I see that there is some placeholder source code for a sgd.function method, and I was wondering if there was a way to use sgd with arbitrary functions for the likelihood and derivative of the likelihood?

EliYannop avatar Jan 16 '18 14:01 EliYannop

You can look at the method of moments example in the repo. It implements a gradient function which is passed into SGD. This can be useful for simple prototyping, bu in general, we don't recommend using a arbitrary R function as it's quite slow in practice: it forces C++ to call an R subprocess at each iteration of training.

dustinvtran avatar Jan 17 '18 05:01 dustinvtran