Changeset 682

Show
Ignore:
Timestamp:
10/27/09 16:52:32 (15 years ago)
Author:
mido
Message:

bayesB renamed to bayes_batch

Location:
library
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/bdmbase.cpp

    r675 r682  
    386386} 
    387387 
    388 void BM::bayesB ( const mat &Data ) { 
     388void BM::bayes_batch ( const mat &Data ) { 
    389389        for ( int t = 0; t < Data.cols(); t++ ) { 
    390390                bayes ( Data.get_col ( t ) ); 
  • library/bdm/base/bdmbase.h

    r679 r682  
    10801080        virtual void bayes ( const vec &yt, const vec &cond=empty_vec ) = 0; 
    10811081        //! Batch Bayes rule (columns of Dt are observations) 
    1082         virtual void bayesB ( const mat &Dt ); 
     1082        virtual void bayes_batch ( const mat &Dt ); 
    10831083        //! Evaluates predictive log-likelihood of the given data record 
    10841084        //! I.e. marginal likelihood of the data with the posterior integrated out.  
  • library/bdm/estim/mixtures.cpp

    r679 r682  
    1717        Coms ( 0 ) = Com0->_copy_(); 
    1818//      Coms(0)->set_evalll(false); 
    19         Coms ( 0 )->bayesB ( Data ); 
     19        Coms ( 0 )->bayes_batch ( Data ); 
    2020        // Flatten it to its original shape 
    2121        Coms ( 0 )->flatten ( Com0 ); 
     
    4141} 
    4242 
    43 void MixEF::bayesB ( const mat &data , const mat &cond, const vec &wData ) { 
     43void MixEF::bayes_batch ( const mat &data , const mat &cond, const vec &wData ) { 
    4444        int ndat = data.cols(); 
    4545        int t, i, niter; 
     
    127127 
    128128void MixEF::bayes ( const mat &data, const vec &cond=empty_vec ) { 
    129         this->bayesB ( data, cond, ones ( data.cols() ) ); 
     129        this->bayes_batch ( data, cond, ones ( data.cols() ) ); 
    130130}; 
    131131 
  • library/bdm/estim/mixtures.h

    r679 r682  
    112112        void bayes ( const mat &yt, const vec &cond ); 
    113113        //! batch weighted Bayes rule  
    114         void bayesB ( const mat &yt, const mat &cond, const vec &wData ); 
     114        void bayes_batch ( const mat &yt, const mat &cond, const vec &wData ); 
    115115        double logpred ( const vec &yt ) const; 
    116116        //! return correctly typed posterior (covariant return) 
  • library/bdm/stat/merger.cpp

    r679 r682  
    103103                //Re-Initialize Mixture model 
    104104                Mix.flatten ( &Mix_init ); 
    105                 Mix.bayesB ( Smp_ex,empty_vec, w*Npoints ); 
     105                Mix.bayes_batch ( Smp_ex,empty_vec, w*Npoints ); 
    106106                delete Mpred; 
    107107                Mpred = Mix.epredictor ( ); // Allocation => must be deleted at the end!! 
  • library/doc/local/Intro.dox

    r271 r682  
    2929 
    3030On-line estimation is implemented by method \code void bayes(vec dt)\endcode 
    31 Off-line estimation is implemented by method \code void bayesB(mat D)\endcode 
     31Off-line estimation is implemented by method \code void bayes_batch(mat D)\endcode 
    3232 
    3333As an intermediate product, the bayes rule computes marginal likelihood of the data records \f$ f(D) \f$. 
  • library/tests/arx_elem_test.cpp

    r679 r682  
    2323        Smp.set_row ( 0, smp ); 
    2424        // 
    25         Ar.bayesB ( Smp ); 
     25        Ar.bayes_batch ( Smp ); 
    2626        // Ar is now filled with estimates of N(0,1); 
    2727        cout << "Empirical moments: mu=" << sum ( smp ) / ndat << ", R=" << sum_sqr ( smp ) / ndat - pow ( sum ( smp ) / ndat, 2 ) << endl; 
  • library/tests/tutorial/arx_simple.cpp

    r679 r682  
    1313        // forgetting is default: 1.0 
    1414        mat Data = concat_vertical ( randn ( 1, 100 ), ones ( 1, 100 ) ); 
    15         Ar.bayesB ( Data ); 
     15        Ar.bayes_batch ( Data ); 
    1616 
    1717        cout << "Expected value of Theta is: " << Ar.posterior().mean() << endl;