Changeset 850 for library/bdm/estim

Show
Ignore:
Timestamp:
03/04/10 16:41:30 (14 years ago)
Author:
smidl
Message:

changes in Loggers!

Location:
library/bdm/estim
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/estim/arx.cpp

    r802 r850  
    225225        rvc = *rrv; 
    226226 
    227         string opt; 
    228         if ( UI::get ( opt, set,  "options", UI::optional ) ) { 
    229                 BM::set_options ( opt ); 
    230         } 
    231227        int constant; 
    232228        if ( !UI::get ( constant, set, "constant", UI::optional ) ) { 
     
    265261        } else { 
    266262                est.set_rv ( *rv_par ); 
    267         } 
    268         //validate(); 
    269 } 
    270 } 
    271  
     263        }        
     264} 
     265 
     266} 
     267 
  • library/bdm/estim/arx.h

    r810 r850  
    131131 
    132132        void validate() { 
     133                BMEF::validate();        
     134 
    133135                //if dimc not set set it from V 
    134136                if ( dimc == 0 ) { 
  • library/bdm/estim/kalman.cpp

    r744 r850  
    429429        set_yrv ( A ( 0 )->_yrv() ); 
    430430        //set_rv(A(0)->_rv()); 
    431  
    432         string options; 
    433         if ( set.lookupValue ( "options", options ) ) 
    434                 set_options ( options ); 
    435 } 
    436  
    437 } 
     431} 
     432 
     433} 
  • library/bdm/estim/kalman.h

    r766 r850  
    293293                set_parameters ( IM, OM, diag ( dQ ), diag ( dR ) ); 
    294294 
    295                 string options; 
    296                 if ( UI::get ( options, set, "options" ) ) 
    297                         set_options ( options ); 
    298295//                      pfxu = UI::build<diffbifn>(set, "IM", UI::compulsory); 
    299296//                      phxu = UI::build<diffbifn>(set, "OM", UI::compulsory); 
     
    318315//                      phxu->dfdu_cond(mu0, zeros(pfxu->_dimu()), C,true); 
    319316// 
    320                 validate(); 
    321         } 
     317        } 
     318 
    322319        void validate() { 
     320                KalmanFull::validate(); 
     321 
    323322                // check stats and IM and OM 
    324323        } 
  • library/bdm/estim/particles.cpp

    r811 r850  
    233233        pf->prior_from_set ( set ); 
    234234        pf->resmethod_from_set ( set ); 
    235          
    236         string opt; 
    237         if ( UI::get ( opt, set, "options", UI::optional ) ) { 
    238                 set_options ( opt ); 
    239         } 
    240          
     235                 
    241236        // read functions g and h 
    242237        g=UI::build<fnc>(set,"g"); 
  • library/bdm/estim/particles.h

    r811 r850  
    2626 
    2727class 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 
    2833protected: 
    2934        //!number of particles; 
     
    7378        }; 
    7479        void set_statistics ( const eEmp &epdf0 ) { 
    75                 bdm_assert_debug ( epdf0._rv().equal ( par->_rv() ), "Incompatibel input" ); 
     80                bdm_assert_debug ( epdf0._rv().equal ( par->_rv() ), "Incompatible input" ); 
    7681                est = epdf0; 
    7782        }; 
    7883        //!@} 
     84 
    7985        //! 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 logged 
    82         //! \li logsamples - all samples will be also logged 
    83         void set_options ( const string &opt ) { 
    84                 BM::set_options ( opt ); 
    85         } 
    8686        //! bayes I - generate samples and add their weights to lls 
    8787        virtual void bayes_gensmp ( const vec &ut ); 
     
    187187 
    188188        void validate() { 
     189                BM::validate(); 
    189190                bdm_assert ( par, "PF::parameter_pdf not specified." ); 
    190191                n = _w.length(); 
     
    220221 
    221222class MPF : public BM  { 
     223        //! Introduces new option  
     224        //! \li means - meaning TODO 
     225        LOG_LEVEL(MPF,means); 
    222226protected: 
    223227        //! particle filter on non-linear variable 
     
    291295                return jest; 
    292296        } 
    293         //! Extends options understood by BM::set_options by option 
    294         //! \li logmeans - meaning 
    295         void set_options ( const string &opt ) { 
    296                 BM::set_options ( opt ); 
    297         } 
    298297 
    299298        //!Access function 
     
    323322        */ 
    324323        void from_setting ( const Setting &set ) { 
     324                BM::from_setting( set ); 
     325 
    325326                shared_ptr<pdf> par = UI::build<pdf> ( set, "parameter_pdf", UI::compulsory ); 
    326327 
     
    334335                set_BM ( *BM0 ); 
    335336 
    336                 string opt; 
    337                 if ( UI::get ( opt, set, "options", UI::optional ) ) { 
    338                         set_options ( opt ); 
    339                 } 
    340337                //set drv 
    341338                //??set_yrv(concat(BM0->_yrv(),u) ); 
     
    350347 
    351348        void validate() { 
     349                BM::validate(); 
    352350                try { 
    353351                        pf->validate();