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

Stochastic Gradient Hamiltonian Monte Carlo #68

Closed
xukai92 opened this issue Dec 16, 2016 · 1 comment
Closed

Stochastic Gradient Hamiltonian Monte Carlo #68

xukai92 opened this issue Dec 16, 2016 · 1 comment

Comments

@xukai92
Copy link
Member

xukai92 commented Dec 16, 2016

Reference

Chen, T., Fox, E. B., & Guestrin, C. (2014, February 17). Stochastic Gradient Hamiltonian Monte Carlo. arXiv.org.

The proposal below is naive.

The Stochastic HMC can use the current code with only making some changes to observe():

1. Count the total number of observations in the first run of the model
2. For later iterations
i. Choose a subset of observations for each iteration (according to obs_frac (observation fraction) set by user)
ii. Only accumulate logpdf of those chosen observations (Note: the subset is fixed for each HMC iteration)

This two changes are done in this branch: https://github.com/yebai/Turing.jl/tree/stochhmc and some simple tests are done, which initially looks fine.

Followed our discussion on correlation last time, I think of using the following way to generate correlated observation sets:

1. User set a correlation ratio corr_rate
2. When generating new observation subset, fix a fraction of observations according to corr_rate and sample the remaining

Expected problem: when obs_frac is large, we would not able to do so. E.g.

We have 10 obs and obs_frac is 0.8. Say our first subset is [1,2,3,4,5,6,7,8].

User pick corr_rate to be 0.125. Then we need to fix one obs, say [1] and sample 7 obs from [9, 10], which is impossible.

@xukai92
Copy link
Member Author

xukai92 commented Dec 27, 2016

Wrong way to do this. Will re-do it after new interface.

@xukai92 xukai92 closed this as completed Dec 27, 2016
@xukai92 xukai92 changed the title Stochastic Hamiltonian Monte Carlo Stochastic Gradient Hamiltonian Monte Carlo Jan 1, 2017
@xukai92 xukai92 changed the title Stochastic Gradient Hamiltonian Monte Carlo Stochastic Gradient Hamiltonian Monte Carlo Jan 1, 2017
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

1 participant