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:
Public Types | |
__VA_ARGS__ | |
enum | log_level_enums { __VA_ARGS__ } |
Public Member Functions | |
Constructors | |
Construction of each epdf should support two types of constructors:
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, from density . | |
virtual mat | sample_mat (int N) const |
Returns N samples, from density . | |
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< pdf > | condition (const RV &rv) const |
Return conditional density on the given RV, the remaining rvs will be in conditioning. | |
virtual shared_ptr< epdf > | marginal (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< epdf > | log_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:
- bdmbase.h
- bdmbase.cpp
Generated on 2 Dec 2013 for mixpp by 1.4.7