Changeset 77dfa39 in tol
- Timestamp:
- Nov 19, 2008, 9:50:26 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 9ba790a
- Parents:
- 8d09f87
- Location:
- tol/stdlib/math/stat/models
- Files:
-
- 2 edited
-
_init_models.tol (modified) (1 diff)
-
bayesian/bysMcmc/_build.tol (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/stat/models/_init_models.tol
r8d09f87 r77dfa39 5 5 6 6 Set Include("mle/_init_mle.tol"); 7 Set Include("bayesian/_init_bayesian.tol");7 //Set Include("bayesian/_init_bayesian.tol"); -
tol/stdlib/math/stat/models/bayesian/bysMcmc/_build.tol
r8d09f87 r77dfa39 84 84 "\n Number of simulations : "<<sampleLength+ 85 85 "\n Cache length : "<<cacheLength_+ 86 "\n Resume : "<< If(resume_,"True","False")+86 "\n Resume : "<<resume_+ 87 87 If(_mcmc.maxTime<1/0, 88 88 "\n MaxTime : "<<_mcmc.maxTime+" seconds","")); … … 92 92 Text numIterFmt = "% "+IntText(numDec)+".0lf"; 93 93 //Resume or clean old simulations 94 Real savedSimulations = If( !resume_,94 Real savedSimulations = If(resume_==0, 95 95 { 96 96 Real OSFilRemove(_.path); … … 117 117 n==_.n, 118 118 { 119 Real WriteLn(_MID+"resuming "<<m+" old simulations"); 120 Matrix lastRow = Sub(old.mcmc,m,1,1,_.n); 121 //WriteLn("TRACE "+_MID+"lastRow="<<lastRow); 122 Real _.sampler::setStore(lastRow); 123 m 119 Real m_ = Case( 120 resume_>0, Min(m,resume_), 121 resume_<0, Max(0,m+resume_) ); 122 If(m_==0, 123 { 124 WriteLn(_MID+"There are not enougth old simulations to resume"); 125 Real OSFilRemove(_.path); 126 0 127 }, 128 { 129 Real WriteLn(_MID+"resuming "<<m_+" old simulations"); 130 Real If(m_==m,0, 131 { 132 Real WriteLn(_MID+"Removing last "<<Real(m-m_)+" old simulations"); 133 Matrix resumed = Sub(old.mcmc,1,1,m_,_.n); 134 Matrix MatWriteFile(_.path, resumed); 135 1 136 }); 137 Matrix lastRow = Sub(old.mcmc,m_,1,1,_.n); 138 //WriteLn("TRACE "+_MID+"lastRow="<<lastRow); 139 Real _.sampler::setStore(lastRow); 140 m_ 141 }) 124 142 }, 125 143 1==1,
Note: See TracChangeset
for help on using the changeset viewer.
