Rao-Blackwellized/Marginal Particle Filter with inner HMMs.
More...
#include <rbpf.h>
|
using | sssv = Eigen::Matrix< float_t, dimss, 1 > |
|
using | nsssv = Eigen::Matrix< float_t, dimnss, 1 > |
|
using | osv = Eigen::Matrix< float_t, dimy, 1 > |
|
using | nsssMat = Eigen::Matrix< float_t, dimnss, dimnss > |
|
using | Mat = Eigen::Matrix< float_t, Eigen::Dynamic, Eigen::Dynamic > |
|
using | arrayVec = std::array< sssv, nparts > |
|
using | arrayfloat_t = std::array< float_t, nparts > |
|
using | cfModType = hmm< dimnss, dimy, float_t, debug > |
|
using | arrayMod = std::array< cfModType, nparts > |
|
using | obs_sized_vec = Eigen::Matrix< float_t, dimobs, 1 > |
|
using | sampled_state_sized_vec = Eigen::Matrix< float_t, dim_s_state, 1 > |
|
using | not_sampled_state_sized_vec = Eigen::Matrix< float_t, dim_ns_state, 1 > |
|
using | dynamic_matrix = Eigen::Matrix< float_t, Eigen::Dynamic, Eigen::Dynamic > |
|
using | func = std::function< const dynamic_matrix(const not_sampled_state_sized_vec &, const sampled_state_sized_vec &)> |
|
using | func_vec = std::vector< func > |
|
|
| rbpf_hmm (const unsigned int &resamp_sched=1) |
| The constructor. More...
|
|
virtual | ~rbpf_hmm () |
| The (virtual) destructor.
|
|
void | filter (const osv &data, const std::vector< std::function< const Mat(const nsssv &x1tLogProbs, const sssv &x2t)> > &fs=std::vector< std::function< const Mat(const nsssv &, const sssv &)> >()) |
| Filter. More...
|
|
float_t | getLogCondLike () const |
| Get the latest conditional likelihood. More...
|
|
std::vector< Mat > | getExpectations () const |
| Get vector of expectations. More...
|
|
virtual float_t | logMuEv (const sssv &x21)=0 |
| Evaluates the first time state density. More...
|
|
virtual sssv | q1Samp (const osv &y1)=0 |
| Sample from the first sampler. More...
|
|
virtual nsssv | initHMMLogProbVec (const sssv &x21)=0 |
| Provides the initial mean vector for each HMM filter object. More...
|
|
virtual nsssMat | initHMMLogTransMat (const sssv &x21)=0 |
| Provides the transition matrix for each HMM filter object. More...
|
|
virtual sssv | qSamp (const sssv &x2tm1, const osv &yt)=0 |
| Samples the time t second component. More...
|
|
virtual float_t | logQ1Ev (const sssv &x21, const osv &y1)=0 |
| Evaluates the proposal density of the second state component at time 1. More...
|
|
virtual float_t | logFEv (const sssv &x2t, const sssv &x2tm1)=0 |
| Evaluates the state transition density for the second state component. More...
|
|
virtual float_t | logQEv (const sssv &x2t, const sssv &x2tm1, const osv &yt)=0 |
| Evaluates the proposal density at time t > 1. More...
|
|
virtual void | updateHMM (cfModType &aModel, const osv &yt, const sssv &x2t)=0 |
| How to update your inner HMM filter object at each time. More...
|
|
virtual void | filter (const obs_sized_vec &data, const func_vec &fs=func_vec())=0 |
| the filtering function that must be defined More...
|
|
virtual | ~rbpf_base () |
| virtual destructor
|
|
|
static constexpr unsigned int | dim_sampled_state |
|
static constexpr unsigned int | dim_not_sampled_state |
|
static constexpr unsigned int | dim_obs |
|
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t, typename float_t, bool debug = false>
class pf::filters::rbpf_hmm< nparts, dimnss, dimss, dimy, resamp_t, float_t, debug >
Rao-Blackwellized/Marginal Particle Filter with inner HMMs.
- Author
- t
◆ arrayfloat_t
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
◆ arrayMod
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
◆ arrayVec
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
◆ cfModType
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
◆ Mat
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
using pf::filters::rbpf_hmm< nparts, dimnss, dimss, dimy, resamp_t, float_t, debug >::Mat = Eigen::Matrix<float_t,Eigen::Dynamic,Eigen::Dynamic> |
◆ nsssMat
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
"not sampled state size matrix"
◆ nsssv
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
"not sampled state size vector"
◆ osv
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
using pf::filters::rbpf_hmm< nparts, dimnss, dimss, dimy, resamp_t, float_t, debug >::osv = Eigen::Matrix<float_t,dimy,1> |
"observation size vector"
◆ sssv
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
"sampled state size vector"
◆ rbpf_hmm()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug>
The constructor.
constructor.
- Parameters
-
resamp_sched | how often to resample (e.g. once every resamp_sched time periods) |
◆ filter()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug>
void pf::filters::rbpf_hmm< nparts, dimnss, dimss, dimy, resamp_t, float_t, debug >::filter |
( |
const osv & |
data, |
|
|
const std::vector< std::function< const Mat(const nsssv &x1tLogProbs, const sssv &x2t)> > & |
fs = std::vector<std::function<const Mat(const nsssv&, const sssv&)> >() |
|
) |
| |
Filter.
filters everything based on a new data point.
- Parameters
-
data | the most recent time series observation. |
fs | a vector of functions computing E[h(x_1t, x_2t^i)| x_2t^i,y_1:t] to be averaged to yield E[h(x_1t, x_2t)|,y_1:t]. Will access the probability vector of x_1t |
◆ getExpectations()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug>
Get vector of expectations.
- Returns
- vector of expectations
◆ getLogCondLike()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug>
Get the latest conditional likelihood.
Get the latest conditional likelihood.
- Returns
- the latest conditional likelihood.
◆ initHMMLogProbVec()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
Provides the initial mean vector for each HMM filter object.
provides the initial probability vector for each HMM filter object.
- Parameters
-
x21 | the second state componenent at time 1. |
- Returns
- a Vec representing the probability of each state element.
◆ initHMMLogTransMat()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
Provides the transition matrix for each HMM filter object.
provides the transition matrix for each HMM filter object.
- Parameters
-
x21 | the second state component at time 1. |
- Returns
- a transition matrix where element (ij) is the probability of transitioning from state i to state j.
◆ logFEv()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
Evaluates the state transition density for the second state component.
Evaluates the state transition density for the second state component.
- Parameters
-
x2t | the current second state component. |
x2tm1 | the previous second state component. |
- Returns
- a float_t evaluation.
◆ logMuEv()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
Evaluates the first time state density.
evaluates mu.
- Parameters
-
x21 | component two at time 1 |
- Returns
- a float_t evaluation
◆ logQ1Ev()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
virtual float_t pf::filters::rbpf_hmm< nparts, dimnss, dimss, dimy, resamp_t, float_t, debug >::logQ1Ev |
( |
const sssv & |
x21, |
|
|
const osv & |
y1 |
|
) |
| |
|
pure virtual |
Evaluates the proposal density of the second state component at time 1.
Evaluates the proposal density of the second state component at time 1.
- Parameters
-
x21 | the second state component at time 1 you sampled. |
y1 | time 1 observation. |
- Returns
- a float_t evaluation of the density.
◆ logQEv()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
Evaluates the proposal density at time t > 1.
Evaluates the proposal density at time t > 1.
- Parameters
-
x2t | the current second state component. |
x2tm1 | the previous second state component. |
yt | the current time series observation. |
- Returns
- a float_t evaluation.
◆ q1Samp()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
Sample from the first sampler.
samples the second component of the state at time 1.
- Parameters
-
- Returns
- a sssv sample for x21.
◆ qSamp()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
Samples the time t second component.
Samples the time t second component.
- Parameters
-
x2tm1 | the previous time's second state component. |
yt | the current observation. |
- Returns
- a Vec sample of the second state component at the current time.
◆ updateHMM()
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
How to update your inner HMM filter object at each time.
How to update your inner HMM filter object at each time.
- Parameters
-
aModel | a HMM filter object describing the conditional closed-form model. |
yt | the current time series observation. |
x2t | the current second state component. |
◆ m_expectations
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
the vector of expectations
◆ m_lastLogCondLike
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
float_t pf::filters::rbpf_hmm< nparts, dimnss, dimss, dimy, resamp_t, float_t, debug >::m_lastLogCondLike |
|
private |
last conditional likelihood
◆ m_logUnNormWeights
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
the array of unnormalized log-weights
◆ m_now
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
◆ m_p_innerMods
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
the array of inner closed-form models
◆ m_p_samps
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
the array of samples for the second state portion
◆ m_resampler
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
◆ m_rs
template<size_t nparts, size_t dimnss, size_t dimss, size_t dimy, typename resamp_t , typename float_t , bool debug = false>
The documentation for this class was generated from the following file: