- Timestamp:
- 09/24/08 13:07:50 (16 years ago)
- Location:
- tests
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
tests/arx_test.cpp
r162 r170 11 11 vec th("0.8 -0.3 0.4 0.01"); 12 12 int ord=th.length(); 13 double sqr= 1;13 double sqr=0.1; 14 14 15 15 //Test constructor 16 mat V0 = 0.00 1*eye(ord+1); V0(0.0)*= 10; //16 mat V0 = 0.00001*eye(ord+1); V0(0.0)*= 10; // 17 17 double nu0 = ord+1; 18 18 19 RV thr("{theta_and_r }" );19 RV thr("{theta_and_r }",vec_1(ord+1)); 20 20 ARX Ar(thr, V0, nu0); 21 epdf& Ar_ep = Ar._epdf();22 21 const epdf& Ar_ep = Ar._epdf(); 22 23 23 //Test estimation 24 int ndat = 1000 ;24 int ndat = 10000; 25 25 int t,j; 26 26 vec Yt(ndat); -
tests/test0.cpp
r162 r170 4 4 #include "../bdm/math/chmat.h" 5 5 6 #include <vector> 6 7 using namespace itpp; 7 8 -
tests/testKF.cpp
r162 r170 57 57 KF.set_parameters(A,B,C,D,chmat(R),chmat(Q)); 58 58 KF.set_est(mu0,chmat(P0) ); //prediction! 59 epdf& KFep = KF._epdf();59 const epdf& KFep = KF._epdf(); 60 60 mat Xt(dimx,Ndat); 61 61 Xt.set_col( 0,KFep.mean() ); … … 66 66 KFf.set_parameters(A,B,C,D,ldmat(R),ldmat(Q)); 67 67 KFf.set_est(mu0,ldmat(P0) ); 68 epdf& KFfep = KFf._epdf();68 const epdf& KFfep = KFf._epdf(); 69 69 mat Xtf(dimx,Ndat); 70 70 Xtf.set_col( 0,KFfep.mean() ); … … 82 82 KFE.set_parameters(&fxu,&hxu,Q,R); 83 83 KFE.set_est(mu0,chmat(P0)); 84 epdf& KFEep = KFE._epdf();84 const epdf& KFEep = KFE._epdf(); 85 85 mat XtE(dimx,Ndat); 86 86 XtE.set_col( 0,KFEep.mean() ); -
tests/testKF_QR.cpp
r162 r170 65 65 epdf& pfinit=evolQR._epdf(); 66 66 KF_QR.set_est(pfinit); 67 epdf& mpost=KF_QR._epdf();68 epdf& mposttr=KFtr._epdf();67 const epdf& mpost=KF_QR._epdf(); 68 const epdf& mposttr=KFtr._epdf(); 69 69 70 70 XQRt.set_col( 0,mpost.mean()); -
tests/testSmp.cpp
r162 r170 99 99 cout << "======= EProd ======== " << endl; 100 100 // we have to change eG.rv to y 101 eG._rv()= y; 101 egamma eGy(x); 102 eGy.set_parameters(a,b); 102 103 //create array 103 104 Array<mpdf*> A(2); 104 105 mepdf meN(eN); 105 mepdf meG(eG );106 mepdf meG(eGy); 106 107 A(0) = &meN; 107 108 A(1) = &meG; … … 114 115 vec v0=vec(0); 115 116 Smp = eP.samplecond(v0,lik,N); 116 disp(concat(eN.mean(),eG .mean()), epV,Smp);117 disp(concat(eN.mean(),eGy.mean()), epV,Smp); 117 118 118 119 //Exit program: