- Timestamp:
- Dec 17, 2009, 3:21:52 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- e786eb3
- Parents:
- 945ef38
- Location:
- tol_tests/tol/BSR
- Files:
-
- 2 edited
-
test_08/test.tol (modified) (5 diffs)
-
test_38/test.tol (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol_tests/tol/BSR/test_08/test.tol
r945ef38 r46d9928 21 21 //These information is unknown in real world problems 22 22 ////////////////////////////////////////////////////////////////////////////// 23 Real m = 1000; 24 Matrix zero = Rand(m,1,0,0); 25 Matrix one = zero+1; 23 26 //Original supplied data 24 Matrix X1 = Rand( 1000, 5, -.3, .3);27 Matrix X1 = Rand(m, 5, -.3, .3); 25 28 //Deived inputs 26 29 Matrix X2 = SubCol(X1,[[1]]) $* SubCol(X1,[[2]]); … … 42 45 //Real filter matrix 43 46 Matrix F = X*b; 44 // Reallinear output45 Matrix Z = F+e;47 //Latent linear output 48 Matrix Z = F+e; 46 49 //Real output probabilities 47 50 Matrix Yp = F01(Z); 48 //Real binary output is true when probability is great than a cutting value 49 Real CuttingValue = 0.50; 50 Matrix Y = GE(Yp,Yp*0+CuttingValue); 51 //Simulated probit model 52 Matrix Y = GE(Z,zero); 53 54 Set mh.estim = Probit(Y, X); 55 Matrix b.mh = mh.estim[1]; 51 56 52 57 ////////////////////////////////////////////////////////////////////////////// … … 145 150 //MCMC dimensions 146 151 Real mcmc.burnin = 1000; 147 Real mcmc.sampleLength = 4 400;152 Real mcmc.sampleLength = 4000; 148 153 Real mcmc.thinning = 2; //Probit mcmc have high alternance 149 154 Real mcmc.cacheLength = 100; 150 //Try order for given by user solution to start MCMC 155 Real bsr.iniVal.try.findFeasible = 1; 156 Real bsr.iniVal.try.zero = 2; 151 157 Real bsr.iniVal.try.givenByUser = 3; 152 //Try order for zero solution to start MCMC 153 Real bsr.iniVal.try.zero = 2; 154 //Try order for constrained minimum norm solution to start MCMC 155 Real bsr.iniVal.try.cnstrMinNorm = 4; 156 //Try order for constrained max likelihood solution to start MCMC 157 Real bsr.iniVal.try.cnstrMLE = 1; 158 Real bsr.iniVal.try.cnstrMinNorm = 5; 159 Real bsr.iniVal.try.cnstrMLE = 4; 158 160 //Generic flags 159 161 Real do.resume = 0; … … 190 192 Matrix outProbAprBys = bsr.oneNode.probit::GetProbAvg(X_); 191 193 192 Matrix CompareBeta = b | b_; 193 Matrix CompareProb = Y|Yp|outProbExcBys|outProbAprBys; 194 Matrix residuals = InvF01(Yp)-InvF01(outProbExcBys); 195 Matrix CompareResiduals = residuals | e; 196 Real residuals.avr = MatAvr(residuals); 197 Real residuals.stds = MatStDs(residuals); 194 Matrix outExcBys = GE(outProbExcBys,one*0.5); 195 Matrix outAprBys = GE(outProbAprBys,one*0.5); 196 197 Matrix CompareBeta = b | b_ | b.mh; 198 Matrix CompareProb = Yp|outProbExcBys|outProbAprBys; 199 Matrix SuccessExcBys = EQ(Y,outExcBys); 200 Matrix SuccessAprBys = EQ(Y,outAprBys); 198 201 199 202 //Success table for Bayesian inference by exact method … … 210 213 Real numErr1 = Copy(NError); 211 214 212 Real quality = M in(1,MatStDs(e)/MatStDs(residuals));215 Real quality = MatAvr(SuccessExcBys); 213 216 //Extented information about test behaviour 214 217 Set partialResults_ = -
tol_tests/tol/BSR/test_38/test.tol
r945ef38 r46d9928 128 128 Real mcmc.thinning = 2; //Probit mcmc have high alternance 129 129 Real mcmc.cacheLength = 100; 130 //Try order for given by user solution to start MCMC 130 Real bsr.iniVal.try.findFeasible = 1; 131 Real bsr.iniVal.try.zero = 2; 131 132 Real bsr.iniVal.try.givenByUser = 3; 132 //Try order for zero solution to start MCMC 133 Real bsr.iniVal.try.zero = 2; 134 //Try order for constrained minimum norm solution to start MCMC 135 Real bsr.iniVal.try.cnstrMinNorm = 4; 136 //Try order for constrained max likelihood solution to start MCMC 137 Real bsr.iniVal.try.cnstrMLE = 1; 133 Real bsr.iniVal.try.cnstrMinNorm = 5; 134 Real bsr.iniVal.try.cnstrMLE = 4; 138 135 //Generic flags 139 136 Real do.resume = 0;
Note: See TracChangeset
for help on using the changeset viewer.
