bdm::mDirich Class Reference

#include <exp_family.h>

List of all members.

Public Member Functions

void condition (const vec &val)
 Update iepdf so that it represents this mpdf conditioned on rvc = cond This function provides convenient reimplementation in offsprings.
void from_setting (const Setting &set)
void validate ()
 This method TODO.
eDiriche ()
 access function to iepdf
vec samplecond (const vec &cond)
 Reimplements samplecond using condition().
double evallogcond (const vec &val, const vec &cond)
 Reimplements evallogcond using condition().
virtual vec evallogcond_m (const mat &Dt, const vec &cond)
 Efficient version of evallogcond for matrices.
virtual vec evallogcond_m (const Array< vec > &Dt, const vec &cond)
 Efficient version of evallogcond for Array<vec>.
virtual mat samplecond_m (const vec &cond, int N)
 Efficient version of samplecond.
virtual string to_string ()
 This method returns a basic info about the current instance.
virtual void to_setting (Setting &set) const
 This method save all the instance properties into the Setting structure.
Access to attributes
const RV_rv () const
const RV_rvc () const
int dimension () const
int dimensionc ()
Connection to other objects
void set_rvc (const RV &rvc0)
void set_rv (const RV &rv0)
bool isnamed ()

Protected Member Functions

void set_ep (epdf &iepdf)
 set internal pointer ep to point to given iepdf
void set_ep (epdf *iepdfp)
 set internal pointer ep to point to given iepdf

Protected Attributes

double k
 constant $ k $ of the random walk
vec & _beta
 cache of beta_i
vec betac
 stabilizing coefficient $ \beta_c $
eDirich iepdf
 Internal epdf used for sampling.
int dimc
 dimension of the condition
RV rvc
 random variable in condition


Detailed Description

Random Walk on Dirichlet Using simple assignment

\[ \beta = rvc / k + \beta_c \]

hence, mean value = rvc, variance = (k+1)*mean*mean;

The greater k is, the greater is the variance of the random walk;

$ \beta_c $ is used as regularizing element to avoid corner cases, i.e. when one element of rvc is zero. By default is it set to 0.1;


Member Function Documentation

void bdm::mDirich::from_setting ( const Setting &  set  )  [inline, virtual]

Create Dirichlet random walk

\[ f(rv|rvc) = Di(rvc*k) \]

from structure

                class = 'mDirich';
                k = 1;                      // multiplicative constant k
                --- optional ---
                rv = RV({'name'},size)      // description of RV
                beta0 = [];                 // initial value of beta
                betac = [];                 // initial value of beta

Reimplemented from bdm::mpdf.

References _beta, betac, bdm::RV::copy_t(), bdm::UI::get(), k, bdm::mpdf::rvc, and validate().


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

Generated on Wed Oct 7 17:34:48 2009 for mixpp by  doxygen 1.5.9