📄 namespace.hpp
字号:
namespace indii { namespace ml { namespace filter {/** * @namespace indii::ml::filter Filters and smoothers. * * @section estimator_introduction Introduction * * The continuous time filtering problem may be framed as follows. * * For an ascending sequence of \f$T\f$ time points * \f$t_1,\ldots,t_T\f$, we are provided with measurements * \f$\mathbf{y}(t_1),\ldots,\mathbf{y}(t_T)\f$ indicative of the * latent state \f$\mathbf{x}(t)\f$ of a dynamic system across time * \f$t\f$. The state of the system transitions according to a known * Markov function \f$f(\mathbf{x},\mathbf{w},\Delta t)\f$, where * \f$\mathbf{w}\f$ is system noise, so that \f$\mathbf{x}(t+\Delta t) * = f(\mathbf{x}(t),\mathbf{w},\Delta t)\f$. The measurement acquired * from the system in any state may be predicted as \f$\mathbf{y}^*\f$ * using a known function \f$g(\mathbf{x},\mathbf{v})\f$, where * \f$\mathbf{v}\f$ is measurement noise, so that \f$\mathbf{y}^*(t) = * g(\mathbf{x}(t),\mathbf{v})\f$. The initial state of the system is * given by the prior \f$P(\mathbf{x}(0))\f$. * * To solve the filtering problem, we wish to calculate * \f$P(\mathbf{x}(t_n)\,|\,\mathbf{y}(t_1),\ldots,\mathbf{y}(t_n))\f$ * for all \f$n = 1,\ldots,T\f$, that is, the distribution over the * state at each time point given the measurements acquired up to and * including that time. * * To solve the smoothing problem, we wish to calculate * \f$P(\mathbf{x}(t_n)\,|\,\mathbf{y}(t_1),\ldots,\mathbf{y}(t_T))\f$ * for all \f$n = 1,\ldots,T\f$, that is, the distribution over the * state at each time point given all the available measurements. This * usually involves solving the filtering problem by stepping forwards * in time, then backwards in time, and fusing the results. * * @section estimator_usage Usage * * All the filters and smoothers provided have the same usage * idiom. This requires two objects: * * @li A @em %method object, which implements the particular * filtering or smoothing algorithm and stores the predicted system * state \f$\mathbf{x}\f$. * @li A @em model object, which defines the transition and * measurement functions \f$f\f$ and \f$g\f$ and system and * measurement noise \f$\mathbf{w}\f$ and \f$\mathbf{v}\f$. * * 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: * * @code * MyParticleFilterModel model; * @endcode * * and a prior distribution over the state of the system: * * @code * 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 x0(mu, sigma); * @endcode * * Pass both of these to the constructor of your chosen method to * instantiate it: * * @code * ParticleFilter filter(&model, x0, 500); * @endcode * * 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. * * @code * 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; * } * @endcode * * See the test suite for more elaborate example code. * * @par 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. */ } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -