mixpp: bdm::epdf Class Reference

bdm::epdf Class Reference

Abstract class representing probability density function with numerical statistics, e.g. posterior density. More...

#include <bdmbase.h>

Inheritance diagram for bdm::epdf:

bdm::pdf bdm::root bdm::dirac bdm::eEF bdm::egrid bdm::emix_base bdm::eprod_base bdm::euni bdm::eBeta bdm::eDirich bdm::egamma bdm::egiw bdm::egw_ls< sq_T > bdm::enorm< sq_T > bdm::enorm< bdm::fsqmat > bdm::estudent< sq_T > bdm::emix bdm::eprod bdm::eprod_internal bdm::MarginalizedParticleBase::eprod_2 bdm::MixEF::eprod_mix bdm::NoiseParticleXY::eprod_3 bdm::ProdBMBase::eprod_bm List of all members.

Public Types

 __VA_ARGS__
enum  log_level_enums { __VA_ARGS__ }

Public Member Functions

Constructors
Construction of each epdf should support two types of constructors:
  • empty constructor,
  • copy constructor,
The following constructors should be supported for convenience:
  • constructor followed by calling set_parameters() WHICH IS OBSOLETE (TODO)
  • constructor accepting random variables calling set_rv()
All internal data structures are constructed as empty. Their values (including sizes) will be set by method set_parameters() WHICH IS OBSOLETE (TODO). This way references can be initialized in constructors.

 epdf ()
 epdf (const epdf &e)
Matematical Operations
virtual vec sample () const =0
 Returns a sample, $ x $ from density $ f_x()$.
virtual mat sample_mat (int N) const
 Returns N samples, $ [x_1 , x_2 , \ldots \ $ from density $ f_x(rv)$.
virtual double evallog (const vec &val) const =0
virtual vec evallog_mat (const mat &Val) const
 Compute log-probability of multiple values argument val.
virtual vec evallog_mat (const Array< vec > &Avec) const
 Compute log-probability of multiple values argument val.
virtual shared_ptr< pdfcondition (const RV &rv) const
 Return conditional density on the given RV, the remaining rvs will be in conditioning.
virtual shared_ptr< epdfmarginal (const RV &rv) const
 Return marginal density on the given RV, the remainig rvs are intergrated out.
virtual vec mean () const =0
virtual vec variance () const =0
 return expected variance (not covariance!)
virtual mat covariance () const
 return expected covariance -- default is diag(variance)!!
virtual void qbounds (vec &lb, vec &ub, double percentage=0.95) const
 Lower and upper bounds of percentage % quantile, returns mean-2*sigma as default.
void set_statistics (const epdf *pdf0) NOT_IMPLEMENTED_VOID
Connection to other classes
Description of the random quantity via attribute rv is optional. For operations such as sampling rv does not need to be set. However, for marginalization and conditioning rv has to be set. NB:

void log_register (logger &L, const string &prefix)
void log_write () const
Create object from the following structure

    //! 


void from_setting (const Setting &set)
void to_setting (Setting &set) const
vec samplecond (const vec &cond)
double evallogcond (const vec &val, const vec &cond)

Public Attributes

log_level_template< epdflog_level

Friends

class log_level_intermediate< epdf >

Detailed Description

Abstract class representing probability density function with numerical statistics, e.g. posterior density.


Member Function Documentation

virtual double bdm::epdf::evallog ( const vec &  val  )  const [pure virtual]

Compute log-probability of argument val In case the argument is out of suport return -Infinity

Implemented in bdm::eEF.

void bdm::epdf::log_register ( logger L,
const string &  prefix 
) [virtual]

store values of the epdf on the following levels: #1 mean #2 mean + lower & upper bound

Reimplemented from bdm::root.

void bdm::epdf::set_statistics ( const epdf pdf0  ) 

Set statistics to match given input epdf. Typically it copies statistics from epdf of the same type and projects those form different types

Parameters:
pdf0 epdf to match


The documentation for this class was generated from the following files:
Generated on 2 Dec 2013 for mixpp by  doxygen 1.4.7