Changeset 1121
- Timestamp:
- 06/29/10 15:58:04 (14 years ago)
- Location:
- library/bdm
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/arx.h
r1077 r1121 209 209 SHAREDPTR ( ARX ); 210 210 211 //! \brief ARX moidel with parameters in LS form 212 class ARXls : public BMEF{ 213 egw_ls<ldmat> est; 214 215 const egw_ls<ldmat>& posterior() {return est;}; 216 217 void bayes(const vec &dt, const vec &psi){ 218 } 219 }; 220 211 221 /*! \brief ARX model conditined by knowledge of the forgetting factor 212 222 \f[ f( heta| d_1 \ldots d_t , \phi_t) \f] -
library/bdm/stat/exp_family.h
r1083 r1121 514 514 SHAREDPTR ( egiw ); 515 515 516 //! \brief Gauss-Wishart with recursion on moments 517 //! Using precision as parameter 518 //! following notation of [Karny Andrysek 2009], precision 519 template<class sq_T> 520 class egw_ls: public eEF{ 521 public: 522 vec theta; 523 sq_T P; 524 double omega; 525 double nu; 526 527 vec mean() const{ 528 return concat(theta, omega); 529 } 530 mat covariance() const { 531 sq_T tmp=P; 532 tmp*=nu/((nu-2)*omega); 533 return tmp.to_mat();//<======= error - missing omega 534 } 535 vec variance() const { 536 return diag(covariance());//<======= error - missing omega 537 } 538 vec sample() const NOT_IMPLEMENTED(vec(0)); 539 double lognc() const {return 0.0;} //TODO 540 }; 541 516 542 /*! \brief Dirichlet posterior density 517 543