Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SGD with arbitrary function for likelihood and gradient #103

Open
EliYannop opened this issue Jan 16, 2018 · 1 comment
Open

SGD with arbitrary function for likelihood and gradient #103

EliYannop opened this issue Jan 16, 2018 · 1 comment

Comments

@EliYannop
Copy link

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?

@dustinvtran
Copy link
Member

dustinvtran commented Jan 17, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants