indii::ml::filter Namespace Reference


Detailed Description

Filters and smoothers.

Usage

All the filters and smoothers provided have the same usage idiom. This requires two objects:

Start by choosing the method to use (e.g. a particle filter), and reading the documentation for the associated class (e.g. ParticleFilter). Each method has a corresponding virtual model class (e.g. ParticleFilterModel). Implement your model by writing a new class that derives from this virtual class. The virtual class provides the functions that must be implemented in order that the model be compatible with your chosen method.

Now, instantiate an object of your model class:

 MyParticleFilterModel model;

and a prior distribution over the state of the system:

 indii::ml::aux::vector mu(5);
 indii::ml::aux::symmetric_matrix sigma(5);

 mu.clear();
 mu(0) = -1.0;
 mu(1) = 1.0;
 mu(2) = 0.8;
 mu(3) = 0.1;
 mu(4) = 5e-3;

 sigma.clear();
 sigma(0,0) = 1.0;
 sigma(1,1) = 1.0;
 sigma(2,2) = 0.01;
 sigma(3,3) = 1e-6;
 sigma(4,4) = 1e-6;

 indii::ml::aux::GaussianPdf tmp(mu, sigma);
 indii::ml::aux::DiracMixturePdf x0(tmp, 500);

Pass both of these to the constructor of your chosen method to instantiate it:

 ParticleFilter filter(&model, x0);

Apply the method by using its step functions to advance it forwards or backwards through time, passing in the relevant measurement at each step. After each step, retrieve the estimated system state.

 unsigned int T = 100;
 unsigned int t;
 double y[T] = { ... }; // measurements, perhaps read in from a file

 for (t = 1; t <= T; t++) {
   filter.filter(t, y[t]);
   std::cout << t << '=';
   std::cout << filter.getFilteredState().getExpectation() << std::endl;
 }

Smoothers have a similar usage idiom. First filter the data, then initialise a smoother, such as ParticleSmoother, with the last state of the filter, and use the smoother's stepping function to proceed backward through time.

See the test suite for more elaborate example code.

Tip:
For the KalmanFilter, KalmanSmoother and RauchTungStriebelSmoother methods, you may instantiate an object of the LinearModel class as your model, rather than deriving your own model class.


Classes

class  AdditiveNoiseParticleResampler
 Particle resampler with independent additive noise source. More...
class  AuxiliaryParticleResampler
 Auxiliary particle resampler. More...
class  Filter
 Abstract filter. More...
class  FixableStateModel
 Model with fixable state variables. More...
class  KalmanFilter
 Kalman filter. More...
class  KalmanFilterModel
 KalmanFilter compatible model. More...
class  KalmanSmoother
 Kalman two-filter smoother. More...
class  KalmanSmootherModel
 KalmanSmoother compatible model. More...
class  KernelForwardBackwardSmoother
 Kernel forward-backward smoother. More...
class  KernelForwardBackwardSmootherModel
 KernelForwardBackwardSmoother compatible model. More...
class  KernelTwoFilterSmoother
 Kernel two-filter smoother. More...
class  KernelTwoFilterSmootherModel
 KernelTwoFilterSmoother compatible model. More...
class  LinearModel
 Simple linear model. More...
class  ParticleFilter
 Particle filter. More...
class  ParticleFilterModel
 ParticleFilter compatible model. More...
class  ParticleResampler
 Resampler for particle filter. More...
class  ParticleSmoother
 Forward-backward particle smoother. More...
class  ParticleSmootherModel
 ParticleSmoother compatible model. More...
class  RauchTungStriebelSmoother
 Rauch-Tung-Striebel (RTS) smoother. More...
class  RauchTungStriebelSmootherModel
 RauchTungStriebelSmoother compatible model. More...
class  RegularisedParticleResampler
 Regularised particle resampler. More...
class  Smoother
 Abstract smoother. More...
class  StratifiedParticleResampler
 Stratified particle resampler. More...
class  TwoFilterSmoother
 Abstract smoother for estimating the state of a system by fusing forward and backward filtering passes. More...
class  UnscentedKalmanFilter
 Unscented Kalman filter. More...
class  UnscentedKalmanFilterMeasurementAdaptor
 Adaptor mapping UnscentedTransformationModel interface to method calls in UnscentedKalmanFilterModel. More...
class  UnscentedKalmanFilterModel
 UnscentedKalmanFilter compatible model. More...
class  UnscentedKalmanFilterTransitionAdaptor
 Adaptor mapping UnscentedTransformationModel interface to method calls in UnscentedKalmanFilterModel. More...
class  UnscentedKalmanSmoother
 Unscented Kalman two-filter smoother. More...
class  UnscentedKalmanSmootherBackwardTransitionAdaptor
 Adaptor mapping UnscentedTransformationModel interface to method calls in UnscentedKalmanSmootherModel. More...
class  UnscentedKalmanSmootherModel
 UnscentedKalmanSmoother compatible model. More...
class  UnscentedTransformation
 Unscented transformation. More...
class  UnscentedTransformationDefaults
 Default parameter settings for UnscentedTransformation. More...
class  UnscentedTransformationModel
 UnscentedTransformation compatible model. More...

Enumerations

enum  Flags {
  NO_STANDARDISATION = 1, NO_RESAMPLING = 2, SAME_PROPOSAL = 4, SAME_PROPAGATIONS = 8,
  FILTER_SMOOTHER = 16
}
 Optimisation flags. More...


Enumeration Type Documentation

enum Flags

Optimisation flags.

These may be ORed and passed to the smooth() methods to trigger optimisations relevant in specific circumstances.

Enumerator:
NO_STANDARDISATION  Do not standardise kernel density evaluations.

The support of $p(\mathbf{x}_{n+1}\,|\,\mathbf{y}_{1:n})$ and $p(\mathbf{x}_{n+1}\,|\,\mathbf{y}_{1:T})$ is assumed equivalent.

NO_RESAMPLING  Assume no resampling was performed by the filter between times $t_n$ and $t_{n+1}$.

In the case that the filter density is used as proposal distribution, this allows reuse of the components supporting $p(\mathbf{x}_{n+1}\, |\,\mathbf{y}_{1:n})$ as the propagations of the proposal particles from $q(\mathbf{x}_n) = p(\mathbf{x}_n\,|\,\mathbf{y}_{1:n})$. In addition, if NO_STANDARDISATION is set, a self-tree kernel density evaluation is performed.

SAME_PROPOSAL  Assume that the proposal distribution is the same as the last call to smooth().

In this case, samples from the proposal distribution are reused from the last call.

SAME_PROPAGATIONS  If SAME_PROPOSAL is set, additionally reuse the propagations of the proposal samples from the last call.
FILTER_SMOOTHER  Use filter-smoother when applicable.

This is significantly faster, but may reduce sampling effectiveness.

Definition at line 18 of file flags.hpp.


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