Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upParameter object and adaptation #19
Conversation
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.
|
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. |
|
Sounds good on the SMC methodology extension. I just have a technical nag I'd like you to fix. |
| @@ -2,26 +2,26 @@ | |||
| # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 | |||
|
|
|||
| blockpfGaussianOpt_impl <- function(data, part, lag) { | |||
| .Call(`_RcppSMC_blockpfGaussianOpt_impl`, data, part, lag) | |||
| .Call('RcppSMC_blockpfGaussianOpt_impl', PACKAGE = 'RcppSMC', data, part, lag) | |||
eddelbuettel
Aug 6, 2017
Collaborator
You are using an Rcpp version older than 0.12.12.
Please upgrade, and re-create the file, or explain why you must use on old version, possibly over at the Rcpp repo with an issue ticket there.
You are using an Rcpp version older than 0.12.12.
Please upgrade, and re-create the file, or explain why you must use on old version, possibly over at the Rcpp repo with an issue ticket there.
LeahPrice
Aug 6, 2017
Author
Collaborator
Thanks for picking up on that. I've fixed it up now.
Thanks for picking up on that. I've fixed it up now.
eddelbuettel
Aug 6, 2017
Collaborator
Thanks.
Thanks.
| * src/RcppExports.cpp: Regenerated. | ||
| * R/RcppExports.R: Idem. | ||
|
|
||
| 2017-08-04 Adam M. Johansen <adam.johansen@gmail.com> |
eddelbuettel
Aug 6, 2017
Collaborator
Thanks for cleaning that up.
Thanks for cleaning that up.
|
Thanks, both -- looks good. |
This commit is the start of making it easier to perform adaptation in SMC.
The main changes here are: