Changeset 46d9928 in tol for tol_tests


Ignore:
Timestamp:
Dec 17, 2009, 3:21:52 PM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
e786eb3
Parents:
945ef38
Message:

Setting initial sequence

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1849 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol_tests/tol/BSR
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tol_tests/tol/BSR/test_08/test.tol

    r945ef38 r46d9928  
    2121//These information is unknown in real world problems
    2222//////////////////////////////////////////////////////////////////////////////
     23Real m = 1000;
     24Matrix zero = Rand(m,1,0,0);
     25Matrix one = zero+1;
    2326//Original supplied data
    24 Matrix X1 = Rand(1000, 5, -.3, .3);
     27Matrix X1 = Rand(m, 5, -.3, .3);
    2528//Deived inputs
    2629Matrix X2 = SubCol(X1,[[1]]) $* SubCol(X1,[[2]]);
    … …  
    4245//Real filter matrix
    4346Matrix F = X*b;
    44 //Real linear output
    45 Matrix Z  = F+e;
     47//Latent linear output
     48Matrix Z = F+e;
    4649//Real output probabilities
    4750Matrix 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
     52Matrix Y  = GE(Z,zero);
     53
     54Set mh.estim = Probit(Y, X);
     55Matrix b.mh = mh.estim[1];
    5156
    5257//////////////////////////////////////////////////////////////////////////////
    … …  
    145150//MCMC dimensions
    146151  Real mcmc.burnin        =  1000;
    147   Real mcmc.sampleLength  =  4400;
     152  Real mcmc.sampleLength  =  4000;
    148153  Real mcmc.thinning      =     2; //Probit mcmc have high alternance
    149154  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;
    151157    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;
    158160//Generic flags
    159161  Real do.resume          =  0;
    … …  
    190192Matrix outProbAprBys = bsr.oneNode.probit::GetProbAvg(X_);
    191193
    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);
     194Matrix outExcBys = GE(outProbExcBys,one*0.5);
     195Matrix outAprBys = GE(outProbAprBys,one*0.5);
     196
     197Matrix CompareBeta = b | b_ | b.mh;
     198Matrix CompareProb = Yp|outProbExcBys|outProbAprBys;
     199Matrix SuccessExcBys = EQ(Y,outExcBys);
     200Matrix SuccessAprBys = EQ(Y,outAprBys);
    198201
    199202//Success table for Bayesian inference by exact method
    … …  
    210213Real numErr1 = Copy(NError);
    211214
    212 Real quality = Min(1,MatStDs(e)/MatStDs(residuals));
     215Real quality = MatAvr(SuccessExcBys);
    213216//Extented information about test behaviour
    214217Set partialResults_ =
  • tol_tests/tol/BSR/test_38/test.tol

    r945ef38 r46d9928  
    128128  Real mcmc.thinning      =     2; //Probit mcmc have high alternance
    129129  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;
    131132    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;
    138135//Generic flags
    139136  Real do.resume          =  0;
Note: See TracChangeset for help on using the changeset viewer.