Changeset 310 for mpdm/TR2244
- Timestamp:
- 04/09/09 14:33:08 (16 years ago)
- Location:
- mpdm/TR2244
- Files:
-
- 1 added
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
mpdm/TR2244/merger_iter_cond.cpp
r301 r310 25 25 26 26 //Differneces in constant term are essential 27 f1.set_parameters ( " 0.4","1",mat ( "0.04" ) );28 f2.set_parameters ( " 0.2", mat ( "0.08" ) );27 f1.set_parameters ( "1","1",mat ( "0.01" ) ); 28 f2.set_parameters ( "2", mat ( "0.02" ) ); 29 29 30 30 mepdf mf2(&f2); … … 40 40 /* Cov(1,2)=0.29; 41 41 Cov(2,1)=0.29;*/ 42 g0.set_parameters ( vec ( " 0 0" ),Cov);// +1*ones ( 3,3 ) );42 g0.set_parameters ( vec ( "2 1" ),Cov);// +1*ones ( 3,3 ) ); 43 43 44 44 // enorm<ldmat>* teste=g0.marginal(concat(u1,u2)); 45 45 // mlnorm<ldmat>* testm=(mlnorm<ldmat>*)teste->condition(u2); 46 46 47 M.set_parameters ( 1.2,1000,1 );47 M.set_parameters ( 1.2,1000,1,0.5); 48 48 49 49 Array<vec> YUU(2); 50 YUU(0)=linspace(-2.9,3.1,20); 51 YUU(1)=linspace(-5,5,20); 52 //YUU(2)=linspace(-3,3,20); 50 YUU(0)=linspace(1.5,2.5,20); 51 YUU(1)=linspace(0.5,1.5,20); 52 53 YUU(0)=linspace(0,4,20); 54 YUU(1)=linspace(-1,3,20); 55 //YUU(2)=linspace(-3,3,20); 53 56 54 M.set_grid(YUU);57 //M.set_grid(YUU); 55 58 56 59 int Ntrials=1; … … 68 71 epdf* MP = MM._Coms ( 0 )->epredictor ( ); 69 72 MP->set_rv(all); 73 74 //Missing piece 75 enorm<ldmat>* miss= (enorm<ldmat>*) MP->marginal(u1); 76 cout << "Missing: " << miss->_mu() << " +- " << miss->_R().to_mat() << endl; 70 77 71 78 RV yu1 = y; yu1.add ( u1 ); … … 102 109 cout << "R1: " << R1mean << " +- " << 2*sqrt(sum_sqr(R1s)/Ntrials-R1mean*R1mean) <<endl; 103 110 cout << "R2: " << R2mean << " +- " << 2*sqrt(sum_sqr(R2s)/Ntrials-R2mean*R2mean) <<endl; 111 112 104 113 }