Skip to content
Adam Johansen edited this page Mar 14, 2018 · 8 revisions

Background

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.

Related work

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 Rcpp and smctc to combine the flexible, friendly interface of R with the speed and power of C++ in this context.

Details of your coding project

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 are listed below. It's not the case that a project will necessarily address all of these issues and it is not an exhaustive list, simply an indication of the type of development that might be involved. The particular direction of the project will depend on the interests and skills of the student.

Some examples:

  • investigate further vectorizing algorithm internals

  • further develop plugin support for RcppSMC to streamline its use through R

  • modify underlying C++ code to allow ancestral lines to be tracked (that is, to keep track of the indices selected in resampling to allow the genealogy associated with the particle filter to be tracked). Aside from being of indepent interest, this information is required to allow certain advanced SMC algorithms to be implemented -- the particle Gibbs algorithm for example.

  • provide additional template support for conditional sequential Monte Carlo algorithms as a necessary step towards supporting those inferential schemes which make use of them

  • include support for backward/ancestor sampling and the particle smoothing algorithms by making use of theses ancestor indices and conditional SMC algorithms

  • provide exemplar particle Gibbs and iterated conditional SMC smoothing algorithms

Expected impact

A successful project will lead to a more stable, more feature complete package allowing relatively easy development of fast implementation of modern 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.

Mentors

Adam Johansen and Dirk Eddelbuettel

Tests

  • Easy: install RcppSMC from CRAN and apply one or more of the example samplers to your own data set.
  • Medium: implement an SMC algorithm of your choice using the RcppSMC package. Turn your code into an R package that passes the R CMD check --as-cran test.
  • Hard: fork the RcppSMC repository; address one of the outstanding simple issues and submit a pull request containing your solution.

Solutions of tests

Students, please post a link to your test results here.

Name: Tiberiu Lepadatu

Solution: I have gone through the documentation and I have tried some of the functions on my data. Can you please elaborate on the medium test?

[Adam] I've corrected an obvious typo (RcppSMC Algorithm should have read RcppSMC package and now does); I'd be happy to elaborate offline if you can send me an email letting me know where to start from (e.g. how much, if anything, do you know about SMC algorithms at this stage?)

Clone this wiki locally