mixpp: bdm::egiw Class Reference

bdm::egiw Class Reference

Gauss-inverse-Wishart density stored in LD form. More...

#include <exp_family.h>

Inheritance diagram for bdm::egiw:

bdm::eEF bdm::epdf bdm::pdf bdm::root List of all members.

Public Types

 __VA_ARGS__
enum  log_level_enums { __VA_ARGS__ }

Public Member Functions

vec sample () const
mat sample_mat (int n) const
vec mean () const
vec variance () const
void sample_mat (mat &Mi, chmat &Ri) const
void factorize (mat &M, ldmat &Vz, ldmat &Lam) const
vec est_theta () const
 LS estimate of $\theta$.
ldmat est_theta_cov () const
 Covariance of the LS estimate.
void mean_mat (mat &M, mat &R) const
 expected values of the linear coefficient and the covariance matrix are written to M and R , respectively
double evallog_nn (const vec &val) const
 In this instance, val= [theta, r]. For multivariate instances, it is stored columnwise val = [theta_1 theta_2 ... r_1 r_2 ].
double lognc () const
void pow (double p)
shared_ptr< epdfmarginal (const RV &rvm) const
 marginal density (only student for now)
Constructors
 egiw (int dimx0, ldmat V0, double nu0=-1.0)
void set_parameters (int dimx0, ldmat V0, double nu0=-1.0)
Access attributes
ldmat_V ()
const ldmat_V () const
double & _nu ()
const double & _nu () const
const int & _dimx () const
void from_setting (const Setting &set)
void to_setting (Setting &set) const
 see egiw::from_setting
void validate ()
void log_register (bdm::logger &L, const string &prefix)
void log_write () const

Public Attributes

log_level_template< egiwlog_level

Protected Attributes

ldmat V
 Extended information matrix of sufficient statistics.
double nu
 Number of data records (degrees of freedom) of sufficient statistics.
int dimx
 Dimension of the output.
int nPsi
 Dimension of the regressor.

Friends

class log_level_intermediate< egiw >

Detailed Description

Gauss-inverse-Wishart density stored in LD form.

For $p$-variate densities,

$ M,R \sim GiW( V_t, \nu_t) \propto |R|^{0.5\nu}\exp(-1/2 tr(R^{-1}[I,M] V_t [I;M'])) $

Factorizes as: $ M|R \sim N( \hat{M}, R \otimes Vz^{-1}) \propto |R|^{-0.5dim(psi)}\exp(-1/2 tr((M-\hat{M})R^{-1}(M-\hat{M})Vz) $ $ R \sim iW( \Lambda,\delta) \propto |R|^{-0.5(\nu - dim(psi))} |\Lambda|^{}\exp(-1/2 tr(R^{-1}\Lambda) $ where in standard notation $ |R|^{-0.5(\delta + p +1)}$, i.e. $ \delta = \nu-dim(psi) -p-1 $


Member Function Documentation

void bdm::egiw::from_setting ( const Setting &  set  )  [virtual]

Create object from the following structure

    class = 'egiw';
    dimx    = [...];       % dimension of the wishart part
    V.L     = [...];       % L part of matrix V
    V.D     = [...];       % D part of matrix V
    -or- fV = [...];       % full matrix V
    -or- dV = [...];       % vector of diagonal of V (when V not given)
    rv = RV({'names',...},[sizes,...],[times,...]);   % description of RV
    rvc = RV({'names',...},[sizes,...],[times,...]);  % description of RV in condition
    --- optional fields ---
    nu      = [];             % scalar \nu ((almost) degrees of freedom)
    --- inherited fields ---
    bdm::eEF::from_setting

fulfilling formula

\[ f(rv) = GiW(V,\nu) \]

If is not given, it will be computed to obtain proper pdf.

See also:
log_level_enums

Reimplemented from bdm::epdf.


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