Changeset 1165 for library

Show
Ignore:
Timestamp:
08/27/10 16:54:35 (14 years ago)
Author:
smidl
Message:

new function samplepred = predictor().sample()

Location:
library/bdm/base
Files:
2 modified

Legend:

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

    r1064 r1165  
    559559        prior().log_level[epdf::logubound]=true; 
    560560    } 
    561     const_cast<epdf&> ( posterior() ).log_register ( L, prefix + L.separator + "apost" ); 
     561    prior().log_level[epdf::logmean]=true; 
     562        const_cast<epdf&> ( posterior() ).log_register ( L, prefix + L.separator + "apost" ); 
    562563} 
    563564 
  • library/bdm/base/bdmbase.h

    r1077 r1165  
    13211321    //! Evaluates predictive log-likelihood of the given data record 
    13221322    //! I.e. marginal likelihood of the data with the posterior integrated out. 
    1323     //! This function evaluates only \f$ y_t \f$, condition is assumed to be the last used in bayes(). 
    1324     //! See bdm::BM::predictor for conditional version. 
     1323    //! Shortcut for bdm::BM::predictor().evallog(yt,cond) - sometimes easier to implement.  
    13251324    virtual double logpred ( const vec &yt, const vec &cond ) const NOT_IMPLEMENTED(0.0); 
     1325         
     1326        //! Sample from predictor(cond). Implemented as sampling the joint density \f$ f(y_t, \theta_t) \f$ and discarding the sample of \f$ \theta_t \f$. 
     1327        virtual vec samplepred(const vec &cond=empty_vec) const NOT_IMPLEMENTED(empty_vec); 
    13261328 
    13271329    //! Matrix version of logpred