mprod Class Reference

Chain rule decomposition of epdf. More...

#include <emix.h>

Inheritance diagram for mprod:

Inheritance graph
[legend]
Collaboration diagram for mprod:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 mprod (Array< mpdf * > mFacs)
 Constructor from list of mFacs, Additional parameter overlap is left for future use. Do not set to true for mprod.
double evalpdflog (const vec &val) const
vec samplecond (const vec &cond, double &ll)
 Returns the required moment of the epdf.
mat samplecond (const vec &cond, vec &ll, int N)
 Returns.
RV getrv (bool checkoverlap=false)
 find common rv, flag
void setrvc (const RV &rv, RV &rvc)
 common rvc of all mpdfs is written to rvc
void setindices (const RV &rv)
 fill all rv*inrv* according to
void setrvcinrv (const RV &rvc, Array< ivec > &rvcind)
 Function fills Array by indeces of mpdfs inside given rv.
virtual void condition (const vec &cond)
 Update ep so that it represents this mpdf conditioned on rvc = cond.
virtual double evalcond (const vec &dt, const vec &cond)
 Shortcut for conditioning and evaluation of the internal epdf. In some cases, this operation can be implemented efficiently.
RV _rvc ()
 access function
RV _rv ()
 access function
epdf_epdf ()
 access function

Protected Attributes

Array< epdf * > epdfs
 pointers to epdfs - shortcut to mpdfs()._epdf()
Array< ivec > rvcinds
 Indeces of rvc in common rvc.
int n
 Number of mpdfs in the composite.
Array< mpdf * > mpdfs
 Elements of composition.
Array< ivec > rvsinrv
 Indeces of rvs in common rv.
Array< ivec > rvcsinrv
 Indeces of rvc in common rv.
Array< ivec > rvinrvcs
 Indeces of common rv in rvc.
RV rv
 modeled random variable
RV rvc
 random variable in condition
epdfep
 pointer to internal epdf


Detailed Description

Chain rule decomposition of epdf.

Probability density in the form of Chain-rule decomposition: \[ f(x_1,x_2,x_3) = f(x_1|x_2,x_3)f(x_2,x_3)f(x_3) \] Note that


Member Function Documentation

vec mprod::samplecond ( const vec &  cond,
double &  ll 
) [inline, virtual]

Returns the required moment of the epdf.

Returns a sample from the density conditioned on cond, $x \sim epdf(rv|cond)$.

Parameters:
cond is numeric value of rv
ll is a return value of log-likelihood of the sample.

Reimplemented from mpdf.

References RV::count(), epdfs, compositepdf::mpdfs, compositepdf::n, mpdf::rv, rvcinds, compositepdf::rvcsinrv, compositepdf::rvinrvcs, and compositepdf::rvsinrv.

Referenced by samplecond().

mat mprod::samplecond ( const vec &  cond,
vec &  ll,
int  N 
) [inline, virtual]

Returns.

Parameters:
N samples from the density conditioned on cond, $x \sim epdf(rv|cond)$.
cond is numeric value of rv
ll is a return value of log-likelihood of the sample.

Reimplemented from mpdf.

References RV::count(), mpdf::rv, and samplecond().

RV compositepdf::getrv ( bool  checkoverlap = false  )  [inherited]

find common rv, flag

Parameters:
checkoverlap modifies whether overlaps are acceptable

References RV::add(), compositepdf::mpdfs, and compositepdf::n.


The documentation for this class was generated from the following file:

Generated on Wed Oct 15 15:57:16 2008 for mixpp by  doxygen 1.5.6