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

Parameter object and adaptation #19

Merged
merged 2 commits into from Aug 6, 2017

Conversation

Projects
None yet
3 participants
@LeahPrice
Collaborator

LeahPrice commented Aug 6, 2017

This commit is the start of making it easier to perform adaptation in SMC.

The main changes here are:

  • Adding a template parameter for the algorithm parameters to the sampler object
  • Creating a base class for adaptation
  • Doing the MCMC repeats within the library
Parameter object and adaptation
This commit is the start of making it easier to perform adaptation in SMC.

The main changes here are:
- Adding a template parameter for the algorithm parameters to the sampler object
- Creating a base class for adaptation
- Changing the MCMC function to give a boolean return.
@LeahPrice

This comment has been minimized.

Show comment
Hide comment
@LeahPrice

LeahPrice Aug 6, 2017

Collaborator

I changed the MCMC step a little so that the loop over the repeats is done within the library and users write code for a single MCMC step for a single particle. This seemed helpful for adapting the number of MCMC repeats (it is easier to work out the acceptance probability from previous steps if you know the number of repeats).

I think in a future pull request I’ll store more of the calculations for data annealing SMC. I’m essentially doubling up on the likelihood and prior calculations because I’m recalculating them for the current particle at every iteration.

Collaborator

LeahPrice commented Aug 6, 2017

I changed the MCMC step a little so that the loop over the repeats is done within the library and users write code for a single MCMC step for a single particle. This seemed helpful for adapting the number of MCMC repeats (it is easier to work out the acceptance probability from previous steps if you know the number of repeats).

I think in a future pull request I’ll store more of the calculations for data annealing SMC. I’m essentially doubling up on the likelihood and prior calculations because I’m recalculating them for the current particle at every iteration.

@eddelbuettel

Sounds good on the SMC methodology extension.

I just have a technical nag I'd like you to fix.

Show outdated Hide outdated R/RcppExports.R
* src/RcppExports.cpp: Regenerated.
* R/RcppExports.R: Idem.
2017-08-04 Adam M. Johansen <adam.johansen@gmail.com>

This comment has been minimized.

@eddelbuettel

eddelbuettel Aug 6, 2017

Collaborator

Thanks for cleaning that up.

@eddelbuettel

eddelbuettel Aug 6, 2017

Collaborator

Thanks for cleaning that up.

@eddelbuettel eddelbuettel merged commit e953543 into rcppsmc:master Aug 6, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@adamjohansen

This comment has been minimized.

Show comment
Hide comment
@adamjohansen

adamjohansen Aug 6, 2017

Collaborator

Thanks, both -- looks good.

Collaborator

adamjohansen commented Aug 6, 2017

Thanks, both -- looks good.

@LeahPrice LeahPrice deleted the LeahPrice:SetUpAdaptation branch Aug 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment