bdm::MergerDiscrete Class Reference
Base class (interface) for for general combination of pdfs on discrete support. More...
#include <merger.h>
Inheritance diagram for bdm::MergerDiscrete:
Public Member Functions | |
Constructors | |
MergerDiscrete () | |
Default constructor. | |
MergerDiscrete (const Array< shared_ptr< pdf > > &S) | |
Constructor from sources. | |
void | set_sources (const Array< shared_ptr< pdf > > &PartSources) |
Function setting the main internal structures. | |
void | set_support (rectangular_support &Sup) |
Set support points from rectangular grid. | |
void | set_support (discrete_support &Sup) |
Set support points from dicrete grid. | |
void | set_debug_file (const string fname) |
set debug file | |
void | set_method (MERGER_METHOD MTH=GEOMETRIC, double beta0=1.2) |
Set internal parameters used in approximation. | |
void | set_support (const epdf &overall, int N) |
Set support points from a pdf by drawing N samples. | |
virtual | ~MergerDiscrete () |
Destructor. | |
Mathematical operations | |
void | merge () |
Merge given sources in given points. | |
vec | merge_points (mat &lW) |
Merge log-likelihood values in points using method specified by parameter METHOD. | |
Access to attributes | |
eEmp & | _Smp () |
Access function. | |
eEmp & | merger () |
void | from_setting (const Setting &set) |
void | to_setting (Setting &set) const |
void | validate () |
Protected Attributes | |
Array< shared_ptr< pdf > > | part_sources |
partial sources | |
Array< datalink_m2e * > | dls |
Data link for each pdf in pdfs. | |
Array< RV > | rvzs |
Array of rvs that are not modelled by pdfs at all, . | |
Array< datalink_m2e * > | zdls |
Data Links for extension . | |
int | Npoints |
number of support points | |
int | Nsources |
number of sources | |
MERGER_METHOD | METHOD |
switch of the methoh used for merging | |
double | beta |
Prior on the log-normal merging model. | |
eEmp | eSmp |
Projection to empirical density (could also be piece-wise linear). | |
bool | DBG |
debug or not debug | |
it_file * | dbg_file |
debugging file | |
Static Protected Attributes | |
static const MERGER_METHOD | DFLT_METHOD |
Default for METHOD. | |
static const double | DFLT_beta |
default for beta |
Detailed Description
Base class (interface) for for general combination of pdfs on discrete support.Mixtures of Gaussian densities are used internally. Switching to other densities should be trivial.
The merged pdfs are expected to be of the form:
where the resulting merger is a density on . Note that all variables will be joined.
As a result of this feature, each source must be extended to common support
where accumulate variables that were not in the original source. These extensions are calculated on-the-fly.
However, these operations can not be performed in general. Hence, this class merges only sources on common support, . For merging of more general cases, use offsprings merger_mix and merger_grid.
use sources for extensions
Member Function Documentation
void bdm::MergerDiscrete::from_setting | ( | const Setting & | set | ) | [virtual] |
Create object from the following structure
class = 'MergerDiscrete'; method = 'arithmetic' or 'geometric' or 'lognormal'; % name of the model used for merging --- compulsory only for lognormal merging model --- beta = x; % scalar prior on the log-normal merging model --- optional fields --- dbg_file = '...'; % name of the file to store debug informations --- inherited fields --- bdm::MergerBase::from_setting
Reimplemented from bdm::root.
Reimplemented in bdm::merger_mix.
The documentation for this class was generated from the following files:
- merger.h
- merger.cpp
Generated on 2 Dec 2013 for mixpp by 1.4.7