SIR_particle_filter - Implements a SIR particle filter


#include "sequential/sequential_particles.h"

Example compile flags (system dependent):
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 

int SIR_particle_filter
	V_v_v **samples,
	Vector_vector **weights,
	int L,
	const Vector_vector *y,
	int (*sample_from_prior)(Vector **,const Vector *,const void *),
	const void *prior_context,
	int (*likelihood)(double *,const Vector *,const Vector *,const void *),
	const void *likelihood_context


This routine implements a SIR (sample-importance-resample) particle filter. It generates L samples at each time-step of the process, which it puts in *samples. It uses the prior distribution p(x_k | x_{k-1}) as a proposal, from which it samples using sample_from_prior. It also needs to evaluate the likelihood p(y_k | x_k), which it does by calling likelihood. The context parameters are provided in case the prior or the likelihood depend on extra variables. As usual, *samples is reused if possible and created if needed, according to the KJB allocation semantics.


NO_ERROR on success, and ERROR on failure, with an appropriate error message being set.


This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.


Ernesto Brau


Ernesto Brau