Changeset 850 for library/bdm/estim/particles.h
- Timestamp:
- 03/04/10 16:41:30 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/particles.h
r811 r850 26 26 27 27 class PF : public BM { 28 //! Introduces two new options: 29 //! \li weights - meaning that all weightes will be logged 30 //! \li samples - all samples will be also logged 31 LOG_LEVEL(PF,weights,samples); 32 28 33 protected: 29 34 //!number of particles; … … 73 78 }; 74 79 void set_statistics ( const eEmp &epdf0 ) { 75 bdm_assert_debug ( epdf0._rv().equal ( par->_rv() ), "Incompatib elinput" );80 bdm_assert_debug ( epdf0._rv().equal ( par->_rv() ), "Incompatible input" ); 76 81 est = epdf0; 77 82 }; 78 83 //!@} 84 79 85 //! Set posterior density by sampling from epdf0 80 //! Extends original BM::set_options by two more options:81 //! \li logweights - meaning that all weightes will be logged82 //! \li logsamples - all samples will be also logged83 void set_options ( const string &opt ) {84 BM::set_options ( opt );85 }86 86 //! bayes I - generate samples and add their weights to lls 87 87 virtual void bayes_gensmp ( const vec &ut ); … … 187 187 188 188 void validate() { 189 BM::validate(); 189 190 bdm_assert ( par, "PF::parameter_pdf not specified." ); 190 191 n = _w.length(); … … 220 221 221 222 class MPF : public BM { 223 //! Introduces new option 224 //! \li means - meaning TODO 225 LOG_LEVEL(MPF,means); 222 226 protected: 223 227 //! particle filter on non-linear variable … … 291 295 return jest; 292 296 } 293 //! Extends options understood by BM::set_options by option294 //! \li logmeans - meaning295 void set_options ( const string &opt ) {296 BM::set_options ( opt );297 }298 297 299 298 //!Access function … … 323 322 */ 324 323 void from_setting ( const Setting &set ) { 324 BM::from_setting( set ); 325 325 326 shared_ptr<pdf> par = UI::build<pdf> ( set, "parameter_pdf", UI::compulsory ); 326 327 … … 334 335 set_BM ( *BM0 ); 335 336 336 string opt;337 if ( UI::get ( opt, set, "options", UI::optional ) ) {338 set_options ( opt );339 }340 337 //set drv 341 338 //??set_yrv(concat(BM0->_yrv(),u) ); … … 350 347 351 348 void validate() { 349 BM::validate(); 352 350 try { 353 351 pf->validate();