-
Notifications
You must be signed in to change notification settings - Fork 31
RcppSMC
Sequential Monte Carlo methods, including particle filters, are a powerful simulation-based technique for approximating probability distributions and associated normalizing constants. See, e.g., Particle Filtering Tutorial for one recent introduction to these methods.
There is a perception that such methods are difficult to implement and good software support is needed.
The majority of software support for such methods is in the form of libraries for lower-level languages (smctc,vsmc) or standalone programs (libBI,biips).
RcppSMC is an attempt to leverage the power of RcppSMC and smctc to combine the flexible, friendly interface of R with the speed and power of C++ in this context.
There is considerable flexibility. The intention is that the project will begin with familiarization with SMC and RcppSMC, before the student goes on to complete some simple tasks to gain confidence and experience with the existing software before moving on to produce substantial enhancements and extensions to the existing skeleton.
Some more concrete items:
-
update the packaging / interface, i.e. use Rcpp Attributes
-
switch to (Rcpp)Armadillo vectors internally (both for efficiency reasons and their expressiveness / readability)
-
investigate vectorizing algorithm internals
-
modify underlying C++ code to allow normalizing constant estimates to be obtained more easily (a prototypical implementation is available) as these are of widespread interest in model selection, particle MCMC and other contexts and are not readily available with the current implementation
-
add additional prototypical algorithm examples, perhaps for more advanced particle filters, model selection or particle MCMC.
A successful project will lead to a more stable, more feature complete package allowing relatively easy development of fast implementation of SMC algorithms within R. This could dramatically increase the use of such methods and make R more attractive to developers working with SMC-algorithms and have impact both within academia and more widely.
Dirk Eddelbuettel and Adam Johansen
The following are divided into two categories; the first contains some skills allows for the demonstration of some essential skills, the second allows a bit more creativity.
- Easy: download Rcpp and apply the example particle filters to simulated data.
- Medium: implement a Kalman filter in R.
- Hard: implement a Kalman filter in Rcpp and package it.
- Actually Interesting: A.D., S.J. Godsill and C. Andrieu, On Sequential Monte Carlo sampling methods for Bayesian filtering, Stat. Comp., 2000 provides a nice introduction to particle filtering. Implement the particle filters described in Section VI-B (which differ only slightly and should allow much code reuse) and reproduce Table 3 of the same paper using your implementation. Particle filters already available in RcppSMC might provide a useful starting point.
Students, please post a link to your test results here.
-
Robin Thekkadathu Ronson: Solutions to Tests Easy and Medium, still working on the Hard Test
-
Hrushikesh Turkhade Solutions: Easy and Medium Hard
-
Rongpeng's Solutions: Easy, Medium, Hard by March 22nd