Changeset 270 for tests/arx_elem_test.cpp
- Timestamp:
- 02/16/09 10:02:08 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
tests/arx_elem_test.cpp
r254 r270 1 1 #include <estim/arx.h> 2 #include <stat/libEF.h>3 2 using namespace bdm; 4 5 //These lines are needed for use of cout and endl6 using std::cout;7 using std::endl;8 3 9 4 int main() { … … 11 6 //Test constructor 12 7 mat V0 = 0.00001*eye(2); V0(0,0)= 0.1; // 13 RV thr("{th r }"); 14 ARX Ar(thr, V0, -1.0); 8 ARX Ar; Ar.set_statistics(1, V0, -1.0); 15 9 16 10 mat mu(1,1); … … 39 33 X2.set_row(0,x); 40 34 41 mlstudent* Ap = Ar.predictor_student( RV("{y }"),RV("{1 }"));35 mlstudent* Ap = Ar.predictor_student(); 42 36 vec Ap_x=Ap->evallogcond_m(X,vec_1(1.0)); 43 37 vec ll_x = Ar.logpred_m(X2); 44 38 45 cout << "normalize : " << xstep*sum( Ap_x) << endl;39 cout << "normalize : " << xstep*sum(exp(Ap_x)) << endl; 46 40 cout << "normalize : " << xstep*sum(exp(ll_x)) << endl; 47 41