pf
gamFilter< dim_pred, float_t > Class Template Reference

A class template for Gamma filtering. More...

#include <cf_filters.h>

Inheritance diagram for gamFilter< dim_pred, float_t >:
Collaboration diagram for gamFilter< dim_pred, float_t >:

Public Types

using psv = Eigen::Matrix< float_t, dim_pred, 1 >
 "predictor size vector"
 
using tsv = Eigen::Matrix< float_t, 2, 1 >
 "two by 1 vector"
 
- Public Types inherited from cf_filter< 1, 1, float_t >
using ssv = Eigen::Matrix< float_t, dimstate, 1 >
 
using osv = Eigen::Matrix< float_t, dimstate, 1 >
 

Public Member Functions

 gamFilter (const float_t &nOneTilde, const float_t &dOneTilde)
 Default constructor. More...
 
virtual ~gamFilter ()
 The (virtual) desuctor.
 
float_t getLogCondLike () const
 Get the latest conditional likelihood. More...
 
tsv getFilterVec () const
 Get the current filter vector. More...
 
void update (const float_t &yt, const psv &xt, const psv &beta, const float_t &sigmaSquared, const float_t &delta)
 Perform a filtering update. More...
 
- Public Member Functions inherited from cf_filter< 1, 1, float_t >
virtual ~cf_filter ()
 The (virtual) destructor.
 

Private Attributes

tsv m_filtVec
 filter vector (shape and rate)
 
float_t m_lastLogCondLike
 last log of the conditional likelihood
 
bool m_fresh
 has data been observed?
 

Detailed Description

template<size_t dim_pred, typename float_t>
class gamFilter< dim_pred, float_t >

A class template for Gamma filtering.

Author
taylor

Constructor & Destructor Documentation

◆ gamFilter()

template<size_t dim_pred, typename float_t >
gamFilter< dim_pred, float_t >::gamFilter ( const float_t &  nOneTilde,
const float_t &  dOneTilde 
)

Default constructor.

Need ths fir constructing default std::array<>s. Fills all vectors and matrices with zeros.Constructor

Parameters
nOneTildedegrees of freedom for time 1 prior.
dOneTilderate parameter for time 1 prior.

Member Function Documentation

◆ getFilterVec()

template<size_t dim_pred, typename float_t >
auto gamFilter< dim_pred, float_t >::getFilterVec ( ) const

Get the current filter vector.

get the current filtering distribution. First element is the shape, second is the rate.

Returns
a vector of the shape and rate parameters of f(p_t | y_{1:t})

◆ getLogCondLike()

template<size_t dim_pred, typename float_t >
auto gamFilter< dim_pred, float_t >::getLogCondLike ( ) const
virtual

Get the latest conditional likelihood.

Returns
the latest conditional likelihood.

Implements cf_filter< 1, 1, float_t >.

◆ update()

template<size_t dim_pred, typename float_t >
void gamFilter< dim_pred, float_t >::update ( const float_t &  yt,
const psv xt,
const psv beta,
const float_t &  sigmaSquared,
const float_t &  delta 
)

Perform a filtering update.

Perform a Gamma filter update.

Parameters
ytthe most recent dependent random variable
xtthe most recent predictor vector
betathe beta vector
sigmaSquaredthe observation variance scale parameter.
deltabetween 0 and 1 the discount parameter

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