pf
svol_bs< nparts, dimx, dimy, resampT > Class Template Reference
Inheritance diagram for svol_bs< nparts, dimx, dimy, resampT >:
Collaboration diagram for svol_bs< nparts, dimx, dimy, resampT >:

Public Types

using ssv = Eigen::Matrix< double, dimx, 1 >
 
using osv = Eigen::Matrix< double, dimy, 1 >
 
- Public Types inherited from BSFilter< nparts, dimx, dimy, resampT >
using ssv = Eigen::Matrix< double, dimx, 1 >
 
using osv = Eigen::Matrix< double, dimy, 1 >
 
using Mat = Eigen::Matrix< double, dimx, dimx >
 
using arrayStates = std::array< ssv, nparts >
 
using arrayDouble = std::array< double, nparts >
 

Public Member Functions

 svol_bs (const double &phi, const double &beta, const double &sigma)
 
double logQ1Ev (const ssv &x1, const osv &y1)
 Calculate q1Ev or log q1Ev. More...
 
double logMuEv (const ssv &x1)
 Calculate muEv or logmuEv. More...
 
double logGEv (const osv &yt, const ssv &xt)
 Calculate gEv or logGEv. More...
 
auto fSamp (const ssv &xtm1) -> ssv
 Sample from the state transition distribution. More...
 
auto q1Samp (const osv &y1) -> ssv
 Samples from time 1 proposal. More...
 
- Public Member Functions inherited from BSFilter< nparts, dimx, dimy, resampT >
 BSFilter (const unsigned int &rs=1)
 The constructor. More...
 
double getLogCondLike () const
 Returns the most recent (log-) conditiona likelihood. More...
 
void filter (const osv &data, const std::vector< std::function< const Mat(const ssv &)> > &fs=std::vector< std::function< const Mat(const ssv &)> >())
 updates filtering distribution on a new datapoint. Optionally stores expectations of functionals. More...
 
auto getExpectations () const -> std::vector< Mat >
 return all stored expectations (taken with respect to $p(x_t|y_{1:t})$ More...
 

Public Attributes

double m_phi
 
double m_beta
 
double m_sigma
 
UnivNormSampler m_stdNormSampler
 

Additional Inherited Members

- Protected Attributes inherited from BSFilter< nparts, dimx, dimy, resampT >
arrayStates m_particles
 particle samples
 
arrayDouble m_logUnNormWeights
 particle unnormalized weights
 
unsigned int m_now
 time point
 
double m_logLastCondLike
 log p(y_t|y_{1:t-1}) or log p(y1)
 
resampT m_resampler
 resampler object
 
std::vector< Matm_expectations
 expectations E[h(x_t) | y_{1:t}] for user defined "h"s
 
unsigned int m_resampSched
 resampling schedule (e.g. resample every __ time points)
 

Member Function Documentation

template<size_t nparts, size_t dimx, size_t dimy, typename resampT >
auto svol_bs< nparts, dimx, dimy, resampT >::fSamp ( const ssv &  xtm1) -> ssv
virtual

Sample from the state transition distribution.

Parameters
xtm1is a const Vec& describing the time t-1 state
Returns
the sample as a Vec

Implements BSFilter< nparts, dimx, dimy, resampT >.

template<size_t nparts, size_t dimx, size_t dimy, typename resampT >
double svol_bs< nparts, dimx, dimy, resampT >::logGEv ( const osv &  yt,
const ssv &  xt 
)
virtual

Calculate gEv or logGEv.

Parameters
ytis a const Vec& describing the time t datum
xtis a const Vec& describing the time t state
Returns
the density or log-density evaluation as a double

Implements BSFilter< nparts, dimx, dimy, resampT >.

template<size_t nparts, size_t dimx, size_t dimy, typename resampT >
double svol_bs< nparts, dimx, dimy, resampT >::logMuEv ( const ssv &  x1)
virtual

Calculate muEv or logmuEv.

Parameters
x1is a const Vec& describing the state sample
Returns
the density or log-density evaluation as a double

Implements BSFilter< nparts, dimx, dimy, resampT >.

template<size_t nparts, size_t dimx, size_t dimy, typename resampT >
double svol_bs< nparts, dimx, dimy, resampT >::logQ1Ev ( const ssv &  x1,
const osv &  y1 
)
virtual

Calculate q1Ev or log q1Ev.

Parameters
x1is a const Vec& describing the time 1 state sample
y1is a const Vec& describing the time 1 datum
Returns
the density or log-density evaluation as a double

Implements BSFilter< nparts, dimx, dimy, resampT >.

template<size_t nparts, size_t dimx, size_t dimy, typename resampT >
auto svol_bs< nparts, dimx, dimy, resampT >::q1Samp ( const osv &  y1) -> ssv
virtual

Samples from time 1 proposal.

Parameters
y1is a const Vec& representing the first observed datum
Returns
the sample as a Vec

Implements BSFilter< nparts, dimx, dimy, resampT >.


The documentation for this class was generated from the following file: