Changeset 1187 for library

Show
Ignore:
Timestamp:
09/16/10 13:21:51 (14 years ago)
Author:
smidl
Message:

logging of weights + old computing of weights

Location:
library/bdm/estim
Files:
2 modified

Legend:

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

    r1064 r1187  
    4343    bayes_weights(); 
    4444 
     45        if (log_level[logweights]) { 
     46                log_level.store( logweights, w); 
     47        } 
     48         
    4549    if ( do_resampling() ) { 
    4650        resample ( ); 
  • library/bdm/estim/particles.h

    r1177 r1187  
    408408    void log_write ( ) const { 
    409409        BM::log_write(); 
    410         if (log_level[logweights]) { 
    411             log_level.store( logweights, w); 
    412         } 
     410                // weigths are before resamplign -- bayes 
    413411        if (log_level[logmeans]) { 
    414412            for (int i=0; i<particles.length(); i++) { 
     
    731729 
    732730                        vec z_y =h->eval(h_args)-dt; 
    733                         ARX *abm = dynamic_cast<ARX*>(bmy.get()); 
    734                         double ll2; 
     731//                      ARX *abm = dynamic_cast<ARX*>(bmy.get()); 
     732/*                      double ll2; 
    735733                        if (abm){ //ARX 
    736734                                shared_ptr<epdf> pr_y(abm->epredictor_student(empty_vec)); 
     
    739737                                shared_ptr<epdf> pr_y(bmy->epredictor(empty_vec)); 
    740738                                ll2=pr_y->evallog(z_y); 
    741                         } 
     739                        }*/ 
    742740                         
    743741                        bmy->bayes(z_y); 
    744742                        // test _lls 
    745                         ll= ll2;//bmy->_ll(); 
     743                        ll= bmy->_ll(); 
    746744                } 
    747745                void from_setting(const Setting &set) {