ParticleSmoother Class Template Reference

Inheritance diagram for ParticleSmoother:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class T = unsigned int>
class indii::ml::filter::ParticleSmoother< T >

Forward-backward particle smoother.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date
ParticleSmoother is suitable for models with nonlinear transition and measurement functions, approximating state and noise with indii::ml::aux::DiracMixturePdf distributions. It is particularly suitable in situations where an appropriate backwards transition function cannot be defined, such as for transition functions defined as convergent differential equations that become divergent when reversed.

See also:
indii::ml::filter for general usage guidelines.

Details

The implementation here is of the second algorithm described in Isard & Blake (1998). This reweights particles obtained during the forwards pass rather than performing a backwards filtering pass to obtain new particles. While this means a backwards transition function need not be defined for the model, the drawback is that the approach is computationally and spatially expensive -- $O(P^2)$ in the number of particles $P$ in both cases.

The forwards pass provides a weighted sample set $\{(\mathbf{s}_t^{(i)},\pi_t^{(i)})\}$ at each time point $t = t_1,\ldots,t_T$ for $i = 1,\ldots,P$. Initialising with $\psi_{t_T} = \pi_{t_T}$, the backwards step to calculate weights at time $t_n$ is as follows:

\begin{eqnarray*} \alpha_{t_n}^{(i,j)} &=& p(\mathbf{x}({t_{n+1}}) = \mathbf{s}_{t_{n+1}}^{(i)}\,|\,\mathbf{x}({t_n}) = \mathbf{s}_{t_n}^{(j)}) \\ \mathbf{\gamma}_{t_n} &=& \alpha_{t_n} \mathbf{\pi}_{t_n} \\ \mathbf{\delta}_{t_n} &=& \alpha_{t_n}^T(\mathbf{\psi}_{t_{n+1}} \oslash \mathbf{\gamma}_{t_n})\\ \mathbf{\psi}_{t_n} &=& \mathbf{\pi}_{t_n} \otimes \mathbf{\delta}_{t_n} \end{eqnarray*}

where $\oslash$ is element-wise division and $\otimes$ element-wise multiplication.

These are then normalised so that $\sum \psi_{t_n}^{(i)} = 1$ and the smoothed result $\{(\mathbf{s}_{t_n}^{(i)},\psi_{t_n}^{(i)})\}$ for $i = 1,\ldots,P$ is stored.

This implementation performs calculations in the above matrix form to take advantage of low-level optimisations in the matrix library. It also uses a sparse matrix implementation of $\alpha$ to alleviate spatial complexity somewhat.

References

Isard, M. & Blake, A. A smoothing filter for Condensation. Proceedings of the 5th European Conference on Computer Vision, 1998, 1, 767-781.

Definition at line 78 of file ParticleSmoother.hpp.


Public Member Functions

 ParticleSmoother (ParticleSmootherModel< T > *model, const T tT, const indii::ml::aux::DiracMixturePdf &p_xT)
 Create new particle smoother.
virtual ~ParticleSmoother ()
 Destructor.
virtual
ParticleSmootherModel
< T > * 
getModel ()
 Get the model being estimated.
virtual void smooth (const T tn, const indii::ml::aux::DiracMixturePdf &p_xtn_ytn)
 Rewind system to time of previous measurement and smooth.
virtual
indii::ml::aux::DiracMixturePdf 
smoothedMeasure ()
 Apply the measurement function to the current smoothed state to obtain an estimated measurement.
void smoothedResample (ParticleResampler *resampler)
 Resample the smoothed state.

Constructor & Destructor Documentation

ParticleSmoother ( ParticleSmootherModel< T > *  model,
const T  tT,
const indii::ml::aux::DiracMixturePdf p_xT 
) [inline]

Create new particle smoother.

Parameters:
model Model to estimate.
tT $t_T$; starting time.
p_xT $p(\mathbf{x}_T)$; prior over the state at time $t_T$.

Definition at line 145 of file ParticleSmoother.hpp.

~ParticleSmoother (  )  [inline, virtual]

Destructor.

Definition at line 153 of file ParticleSmoother.hpp.


Member Function Documentation

indii::ml::filter::ParticleSmootherModel< T > * getModel (  )  [inline, virtual]

Get the model being estimated.

Returns:
The model being estimated.

Definition at line 159 of file ParticleSmoother.hpp.

void smooth ( const T  tn,
const indii::ml::aux::DiracMixturePdf p_xtn_ytn 
) [inline, virtual]

Rewind system to time of previous measurement and smooth.

Parameters:
tn $t_n$; the time to which to rewind the system. This must be less than the current time $t_{n+1}$.
p_xtn_ytn $p(\mathbf{x}_n\,|\,\mathbf{y}_{1:n})$; filter density at time $t_n$.

Definition at line 164 of file ParticleSmoother.hpp.

indii::ml::aux::DiracMixturePdf smoothedMeasure (  )  [inline, virtual]

Apply the measurement function to the current smoothed state to obtain an estimated measurement.

Returns:
The estimated measurement.

Implements Smoother< T, indii::ml::aux::DiracMixturePdf >.

Definition at line 228 of file ParticleSmoother.hpp.

void smoothedResample ( ParticleResampler resampler  )  [inline]

Resample the smoothed state.

See also:
ParticleFilter::resample()

Definition at line 245 of file ParticleSmoother.hpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3