- Timestamp:
- 05/23/10 11:39:58 (15 years ago)
- Location:
- library
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/arx_ext.h
r804 r970 55 55 \code 56 56 class = 'ARXg'; 57 rv= RV({names_of_dt} ) // description of output variables57 yrv = RV({names_of_dt} ) // description of output variables 58 58 rgr = RV({names_of_regressors}, [-1,-2]} // description of regressor variables 59 59 constant = 1; // 0/1 switch if the constant term is modelled or not … … 64 64 alternative = {class='egiw',...}; // Alternative density in stabilized estimation, when not given prior is used 65 65 66 frg = 1.0;// forgetting, default frg=1.066 frg = 1.0; // forgetting, default frg=1.0 67 67 68 rv_param = RV({names_of_parameters}} // description of parametetr names 69 // default: ["theta_i" and "r_i"] 68 rv = RV({names_of_parameters}} // description of parametetr names 70 69 \endcode 71 70 */ -
library/bdm/stat/exp_family.cpp
r957 r970 298 298 299 299 void egiw::log_register ( bdm::logger& L, const string& prefix ) { 300 if ( log_level[logmean] || log_level[logvariance] ) { 301 root::log_register ( L, prefix ); 302 int th_dim = dimension() - dimx * ( dimx + 1 ) / 2; 303 304 if ( log_level[logmean] ) 305 L.add_vector( log_level, logmean, RV ( th_dim ), prefix ); 306 if ( log_level[logvariance] ) 307 L.add_vector( log_level, logvariance, RV ( th_dim * th_dim ), prefix ); 308 } else { 309 epdf::log_register ( L, prefix ); 300 epdf::log_register ( L, prefix ); 301 if ( log_level[logvartheta] ) { 302 int th_dim = dim - dimx*dimx; // dimension - dimension of cov 303 L.add_vector( log_level, logvartheta, RV ( th_dim ), prefix ); 310 304 } 311 305 } 312 306 313 307 void egiw::log_write() const { 314 if ( log_level[logmean] || log_level[logvariance] ) { 308 epdf::log_write(); 309 if ( log_level[logvartheta] ) { 315 310 mat M; 316 311 ldmat Lam; 317 312 ldmat Vz; 318 313 factorize ( M, Vz, Lam ); 319 if( log_level[logmean] ) 320 log_level.store( logmean, est_theta() ); 321 if( log_level[logvariance] ) 322 log_level.store( logvariance, cvectorize ( est_theta_cov().to_mat() ) ); 323 } else { 324 epdf::log_write(); 314 if( log_level[logvartheta] ) 315 log_level.store( logvartheta, cvectorize ( est_theta_cov().to_mat() ) ); 325 316 } 326 317 } -
library/bdm/stat/exp_family.h
r964 r970 296 296 297 297 vec mean() const {return mu;} 298 mat covariance() const {return delta/(delta-2)*H.to_mat();} 298 mat covariance() const { 299 return delta/(delta-2)*H.to_mat(); 300 } 299 301 vec variance() const {return diag(covariance());} 300 302 //! \name access … … 338 340 */ 339 341 class egiw : public eEF { 340 //! \var log_level_enums logvariance 341 //! TODO DOPLNIT 342 343 //! \var log_level_enums logmean 344 //! TODO DOPLNIT 345 LOG_LEVEL(egiw,logmean, logvariance); 342 //! \var log_level_enums logvartheta 343 //! Log variance of the theta part 344 345 LOG_LEVEL(egiw,logvartheta); 346 346 347 347 protected: -
library/tests/testsuite/estudent.cfg
r802 r970 6 6 mu = [1]; 7 7 H = ( "matrix", 1, 1, [ 1.0 ] ); 8 delta = 3.0;8 delta = 6.0; 9 9 }; 10 10 mean = [1]; 11 variance = [ 3.0];12 R = ("matrix",1,1,[ 3.0]);11 variance = [1.5]; 12 R = ("matrix",1,1,[1.5]); 13 13 support = { 14 14 class = "rectangular_support"; 15 ranges = ( [ -1 2.0, 12.0 ] );15 ranges = ( [ -10.0, 12.0 ] ); 16 16 gridsizes = [ 100 ]; 17 17 };