1 #ifndef _BAYES_FILTER_SIR 2 #define _BAYES_FILTER_SIR 105 template <
class Predict_model>
118 n(q_size), rootq(q_size)
133 xp = Predict_model::f(x);
137 for (FM::DenseVec::iterator ni = n.begin(); ni != n.end(); ++ni) {
138 *ni *= rootq[ni.index()];
150 for (FM::Vec::const_iterator qi = this->q.begin(); qi != this->q.end(); ++qi) {
153 rootq[qi.index()] = std::sqrt(*qi);
161 mutable bool first_init;
211 void observe_likelihood (
const FM::Vec& lw);
218 if (rougheningK != 0)
219 roughen_minmax (S, rougheningK);
233 static const Float rougheningKinit;
265 void update_statistics ();
270 if (rougheningK != 0)
271 roughen_correlated (S, rougheningK);
FMVec< detail::BaseDenseVector > DenseVec
Definition: uBLASmatrix.hpp:333
virtual const FM::Vec & fw(const FM::Vec &x) const
Definition: SIRFlt.hpp:123
void predict(Functional_predict_model &f)
Definition: SIRFlt.hpp:201
virtual void normal(FM::DenseVec &v)=0
Sampled_general_predict_model(std::size_t x_size, std::size_t q_size, SIR_random &random_helper)
Definition: SIRFlt.hpp:113
Float update_resample()
Definition: SIRFlt.hpp:191
virtual void predict(Functional_predict_model &f)
Definition: bayesFlt.cpp:257
void init_GqG() const
Definition: SIRFlt.hpp:144
Definition: SIRFlt.hpp:48
Definition: bayesException.hpp:52
virtual void uniform_01(FM::DenseVec &v)=0
Definition: SIRFlt.hpp:97
std::size_t stochastic_samples
Definition: SIRFlt.hpp:182
Importance_resampler::Resamples_t resamples
Definition: SIRFlt.hpp:229
Definition: bayesException.hpp:20
virtual void roughen()
Definition: SIRFlt.hpp:215
Definition: bayesFlt.hpp:488
Definition: SIRFlt.hpp:90
FMVec< detail::BaseVector > Vec
Definition: uBLASmatrix.hpp:323
Definition: bayesFlt.hpp:33
BOOST_UBLAS_INLINE detail::noalias_proxy< E > noalias(ublas::matrix_expression< E > &lvalue)
Definition: uBLASmatrix.hpp:85
Sampled_general_predict_model< Linear_invertable_predict_model > Sampled_LiInAd_predict_model
Definition: SIRFlt.hpp:165
Definition: SIRFlt.hpp:106
std::vector< std::size_t > Resamples_t
Definition: SIRFlt.hpp:68
Definition: SIRFlt.hpp:238
Definition: bayesFlt.hpp:116
Definition: bayesFlt.hpp:101
Sampled_LiAd_predict_model roughen_model
Definition: SIRFlt.hpp:276
void update()
Definition: SIRFlt.hpp:252
Float rougheningK
Definition: SIRFlt.hpp:214
bool wir_update
Definition: SIRFlt.hpp:231
SIR_random & random
Definition: SIRFlt.hpp:225
Bayesian_filter_matrix::Float Float
Definition: bayesFlt.hpp:39
virtual ~SIR_random()
Definition: SIRFlt.hpp:56
void roughen()
Definition: SIRFlt.hpp:268
FMMatrix< detail::SymMatrixWrapper< detail::BaseRowMatrix > > SymMatrix
Definition: uBLASmatrix.hpp:327
Definition: bayesFlt.hpp:240
Definition: SIRFlt.hpp:60
Definition: SIRFlt.hpp:171
Float update_resample()
Definition: SIRFlt.hpp:257
FMMatrix< detail::BaseColMatrix > ColMatrix
Definition: uBLASmatrix.hpp:326
Definition: bayesFlt.hpp:692
FM::DenseVec wir
Definition: SIRFlt.hpp:230
Sampled_general_predict_model< Linear_predict_model > Sampled_LiAd_predict_model
Definition: SIRFlt.hpp:164