Changeset 9421997 in tol


Ignore:
Timestamp:
May 13, 2010, 2:57:16 PM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
db2b6d3
Parents:
14855c0
Message:

Trazas

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol_pkg/BysVecLinReg/Multivariate.tol

    r14855c0 r9421997  
    117117
    118118  ////////////////////////////////////////////////////////////////////////////
    119   // Returns G(A)
     119  // Returns G(coefMat)
    120120  // User must inherite a class redefining this method to apply
    121121  // arbitrary constraining inequalities and set the correct value of _.r.G
    122   VMatrix eval.arbitraryConstrainingInequalities(VMatrix A)
     122  VMatrix eval.arbitraryConstrainingInequalities(VMatrix coefMat)
    123123  ////////////////////////////////////////////////////////////////////////////
    124124  {
    … …  
    370370      Real _numTry = 0;
    371371      VMatrix A = BysVecLinReg::vec2vmatrix(vec.A,_.A);
     372      VMatrix G.A = Rand(0,0,0,0);
     373      Real min.G.A = ?;
    372374      While(And(!match,_numTry<maxAcceptRejectTry),
    373375      {
    374376      //WriteLn("TRACE gibbs.draw.vec.A 3");
    375         VMatrix G.A = eval.arbitraryConstrainingInequalities(A);
    376         Real match := VMatMin(G.A)>=0;
     377        VMatrix G.A := eval.arbitraryConstrainingInequalities(A);
     378        Real min.G.A := VMatMin(G.A);
     379        Real match := Copy(min.G.A>0);
    377380        VMatrix If(!match,
    378381        {
    … …  
    384387      If(match,
    385388      {
    386         VMatrix _.vec.A := vec.A;
    387         VMatrix _.A := A;
     389      //WriteLn("TRACE [BysVecLinReg::@Multivariate::gibbs.draw.vec.A] accepted simulation "<<numSim+" with min.G.A = "<<min.G.A+" after "<<_numTry+" tries ");
     390      //WriteLn("TRACE [BysVecLinReg::@Multivariate::gibbs.draw.vec.A] vec.A=\n"<<VMat2Mat(vec.A));
     391        VMatrix _.vec.A := Copy(vec.A);
     392        VMatrix _.A := Copy(A);
    388393        Copy(_.vec.A)
    389394      },
    … …  
    391396        WriteLn("[BysVecLinReg::@Multivariate::gibbs.draw.vec.A] Too much "
    392397        "rejected tries at simulation "<<numSim, "W");
    393         Copy(_.vec.A)
     398        Copy(vec.A)
    394399      })
    395400    })
Note: See TracChangeset for help on using the changeset viewer.