- Timestamp:
- Feb 3, 2009, 9:21:52 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 8a2250d
- Parents:
- 151dc42
- Location:
- tol_tests/tol/random_generation
- Files:
-
- 2 edited
-
test_0003/test.tol (modified) (2 diffs)
-
test_0004/test.tol (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol_tests/tol/random_generation/test_0003/test.tol
r151dc42 rf84924c 8 8 Text summary_ = 9 9 "Test of coherence and completeness of truncated bi-normal" ; 10 11 Real PutRandomSeed(0); 12 Real rnd_seed=GetRandomSeed(0); 13 WriteLn("rnd_seed "+IntText(rnd_seed)); 14 15 Real numErr0 = Copy(NError); 10 16 11 17 //We go to divide the real plane in 4 quadrants and draw a bidimensional … … 104 110 Real ph = p1^h; 105 111 112 Real numErr1 = Copy(NError); 113 106 114 //Extented information about test behaviour 107 115 Set partialResults_ = 108 116 [[ 117 numErr0, 118 numErr1, 109 119 r00,r01,r10,r11 110 120 ]]; 111 121 //This is a messure of the success of the test 112 Real quality_ = And( r00,r01,r10,r11)*(1-ph);122 Real quality_ = And(numErr1 == numErr0,r00,r01,r10,r11)*(1-ph); 113 123 114 124 //Return the results -
tol_tests/tol/random_generation/test_0004/test.tol
r151dc42 rf84924c 9 9 "Test of UniKerDnsEstOptBnw" ; 10 10 11 Real numErr0 = Copy(NError); 12 13 Real PutRandomSeed(3245324); 11 Real PutRandomSeed(0); 14 12 Real rnd_seed=GetRandomSeed(0); 15 13 WriteLn("rnd_seed "+IntText(rnd_seed)); 16 14 15 Real numErr0 = Copy(NError); 16 17 WriteLn("TRACE 1"); 17 18 Real modes = IntRand(10,10); 18 19 Matrix nu = Rand(modes,1,-100, +100); … … 27 28 }; 28 29 Matrix Nmode = Tra(RandMultinomial(1, N, Tra(weight))); 30 //WriteLn("TRACE 2"); 29 31 30 32 Real Dens(Real x) … … 42 44 Set BMTFile([[X]], "X.bmt"); 43 45 46 //WriteLn("TRACE 3"); 44 47 Matrix F = Frequency(X,100); 45 48 Real parts = 1000; … … 48 51 Matrix T = Tra(SetMat([[r]])); 49 52 Real t0 = Copy(Time); 53 //WriteLn("TRACE 3.1"); 50 54 Matrix KD = UniKerDnsEstOptBnw(X,T,0,2,1.E-3); 55 //WriteLn("TRACE 3.2"); 51 56 Real tm = Copy(Time)-t0; 52 57 WriteLn("Time for UniKerDnsEstOptBnw "<<tm+" / "+IntText(N)+"="<<(tm/N)); … … 56 61 [[f]] 57 62 })); 63 //WriteLn("TRACE 4"); 58 64 Matrix CmpKde = T | KD | D; 59 65 Set BMTFile([[CmpKde]],"CmpKde.bmt"); … … 65 71 Real MatAvr(KD); 66 72 Real MatAvr(D); 73 //WriteLn("TRACE 5"); 67 74 68 75 Real numErr1 = Copy(NError); … … 71 78 Set partialResults_ = 72 79 [[ 73 Real ok = numErr1 == numErr0; 80 numErr0, 81 numErr1, 74 82 Real okStd = difStdErr < Sqrt(1/Rows(X)) 75 83 ]]; 76 84 //This is a messure of the success of the test 77 Real quality_ = And( ok,okStd);85 Real quality_ = And(numErr1 == numErr0,okStd); 78 86 87 //WriteLn("TRACE 6"); 79 88 //Return the results 80 89 Set resultStr_ = strTestStatus(summary_, link_, quality_,
Note: See TracChangeset
for help on using the changeset viewer.
