Changeset 168 for bdm/stat/libEF.h
- Timestamp:
- 09/18/08 19:54:09 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/libEF.h
r162 r168 113 113 * \brief Gauss-inverse-Wishart density stored in LD form 114 114 115 * More?... 115 * For \f$p\f$-variate densities, given rv.count() should be \f$p\times\f$ V.rows(). 116 * 116 117 */ 117 118 class egiw : public eEF { … … 121 122 //! Number of data records (degrees of freedom) of sufficient statistics 122 123 double nu; 123 public: 124 //!Default constructor 124 //! Dimension of the output 125 int xdim; 126 //! Dimension of the regressor 127 int nPsi; 128 public: 129 //!Default constructor, assuming 125 130 egiw(RV rv, mat V0, double nu0): eEF(rv), V(V0), nu(nu0) { 126 it_assert_debug(rv.count()==V.rows(),"Incompatible V0."); 131 xdim = rv.count()/V.rows(); 132 it_assert_debug(rv.count()==xdim*V.rows(),"Incompatible V0."); 133 nPsi = V.rows()-xdim; 127 134 } 128 135 129 136 vec sample() const; 130 137 vec mean() const; 138 //! In this instance, val= [theta, r]. For multivariate instances, it is stored columnwise val = [theta_1 theta_2 ... r_1 r_2 ] 131 139 double evalpdflog ( const vec &val ) const; 132 140 double lognc () const;