Show
Ignore:
Timestamp:
05/27/10 23:07:16 (14 years ago)
Author:
smidl
Message:

changes in bayes_batch

Files:
1 modified

Legend:

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

    r989 r1009  
    12931293        @param dt vector of input data 
    12941294        */ 
    1295         virtual void bayes ( const vec &yt, const vec &cond = empty_vec ) = 0; 
     1295        virtual void bayes ( const vec &yt, const vec &cond = empty_vec ) =0; 
    12961296        //! Batch Bayes rule (columns of Dt are observations) 
    1297         virtual void bayes_batch ( const mat &Dt, const vec &cond = empty_vec ); 
     1297        virtual double bayes_batch ( const mat &Dt, const vec &cond = empty_vec ); 
    12981298        //! Batch Bayes rule (columns of Dt are observations, columns of Cond are conditions) 
    1299         virtual void bayes_batch ( const mat &Dt, const mat &Cond ); 
     1299        virtual double bayes_batch ( const mat &Dt, const mat &Cond ); 
    13001300        //! Evaluates predictive log-likelihood of the given data record 
    13011301        //! I.e. marginal likelihood of the data with the posterior integrated out. 
    13021302        //! This function evaluates only \f$ y_t \f$, condition is assumed to be the last used in bayes(). 
    13031303        //! See bdm::BM::predictor for conditional version. 
    1304         virtual double logpred ( const vec &yt ) const NOT_IMPLEMENTED(0.0); 
     1304        virtual double logpred ( const vec &yt, const vec &cond ) const NOT_IMPLEMENTED(0.0); 
    13051305 
    13061306        //! Matrix version of logpred 
    1307         vec logpred_mat ( const mat &Yt ) const { 
     1307        vec logpred_mat ( const mat &Yt, const mat &Cond ) const { 
    13081308                vec tmp ( Yt.cols() ); 
    13091309                for ( int i = 0; i < Yt.cols(); i++ ) { 
    1310                         tmp ( i ) = logpred ( Yt.get_col ( i ) ); 
     1310                        tmp ( i ) = logpred ( Yt.get_col ( i ), Cond.get_col(i) ); 
    13111311                } 
    13121312                return tmp;