Changeset 5e3cfca in tol
- Timestamp:
- Feb 9, 2010, 1:47:47 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 1134230
- Parents:
- 681fb68
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/_oneNode.tol
r681fb68 r5e3cfca 83 83 { 84 84 Text _MID = "[BysMcmc::Bsr::OneNode::GetCycler]"; 85 //WriteLn( _MID+" TRACE1");85 //WriteLn(" TRACE "+_MID+" 1"); 86 86 //Output matrix 87 87 VMatrix Y = data::_.Y; 88 //WriteLn( _MID+" TRACE2");88 //WriteLn("TRACE "+_MID+" 2"); 89 89 //Input matrix 90 90 VMatrix X = data::_.X; 91 91 92 //WriteLn( _MID+" TRACE3");92 //WriteLn("TRACE "+_MID+" 3"); 93 93 //Observational data length 94 94 Real m = VRows(Y); … … 106 106 Matrix domain.A.triplet = Rand(0,3,0,0); 107 107 108 //WriteLn( _MID+" TRACE4");108 //WriteLn("TRACE "+_MID+" 4"); 109 109 //Builds linear block and collects prior and domain information 110 110 Set linearBlock = For(1,n, Set(Real j) … … 112 112 Set pi = (data::_.linearParamInfo)[j]; 113 113 Set aux = [[@BSR.LinearBlock(pi->Name, pi->InitValue, True, False)]]; 114 //WriteLn( _MID+" TRACE4.["<<j+"].1");114 //WriteLn("TRACE "+_MID+" 4.["<<j+"].1"); 115 115 Real prior.Average = If(ObjectExist("Real","pi->Prior.Average"), 116 116 pi->Prior.Average, ?); … … 129 129 0 130 130 }); 131 //WriteLn( _MID+" TRACE4.["<<j+"].2");131 //WriteLn("TRACE "+_MID+" 4.["<<j+"].2"); 132 132 Real prior.LowerBound = If(ObjectExist("Real","pi->Prior.LowerBound"), 133 133 pi->Prior.LowerBound, -1/0); … … 140 140 0 141 141 }); 142 //WriteLn( _MID+" TRACE4.["<<j+"].3");142 //WriteLn("TRACE "+_MID+" 4.["<<j+"].3"); 143 143 Real prior.UpperBound = If(ObjectExist("Real","pi->Prior.UpperBound"), 144 144 pi->Prior.UpperBound, +1/0); … … 157 157 //Checks unique name and prepares for hashed searching by name 158 158 Real SetIndexByName(linearBlock); 159 //WriteLn( _MID+" TRACE5");159 //WriteLn("TRACE "+_MID+" 5"); 160 160 //Domain constraints 161 161 VMatrix domain.A = Triplet(domain.A.triplet,domain.num,n); … … 184 184 Real m.full = m+prior.num; 185 185 186 //WriteLn( _MID+" TRACE6");186 //WriteLn("TRACE "+_MID+" 6"); 187 187 //Observational information 188 188 Real sigmaIsUnknown = IsUnknown(data::_.sigma); … … 207 207 ]]}; 208 208 209 //WriteLn( _MID+" TRACE 7");209 //WriteLn("TRACE "+_MID+" 7.1"); 210 210 //Prior information 211 VMatrix prior.X = Triplet(prior.X.triplet,prior.num,n); 211 VMatrix prior.X = Convert(Triplet(prior.X.triplet,prior.num,n),"Cholmod.R.Sparse"); 212 //WriteLn("TRACE "+_MID+" 7.2"); 212 213 Real sigmaIndex = If(sigmaIsUnknown,1,0); 213 214 Set noisePrior = For(1,Card(prior.index),Set(Real j) 214 215 { 216 //If(!j%100, WriteLn("TRACE "+_MID+" 8."<<j)); 215 217 Set pi = (data::_.linearParamInfo)[prior.index[j] ]; 216 218 Real estimSigma = Case( … … 246 248 Set NonLinFilters = Copy(Empty) 247 249 ) 248 });249 250 //WriteLn( _MID+" TRACE 8");250 }); 251 252 //WriteLn("TRACE "+_MID+" 9.1"); 251 253 //All allowed segments in this simplified API are obs and prior (optionally) 252 254 Set noiseDistrib_ = noiseObs << noisePrior; … … 259 261 //Checks unique name and prepares for hashed searching by name 260 262 Real SetIndexByName(noiseDistrib); 261 //WriteLn( _MID+" TRACE 9");263 //WriteLn("TRACE "+_MID+" 9.2"); 262 264 //Building generic model definition 263 265 Set modelDef = @BSR.ModelDef ( … … 275 277 VMatrix A = domain.A << order.A 276 278 ); 279 //WriteLn("TRACE "+_MID+" 9.3"); 277 280 BysMcmc::@Cycler cycler = BysMcmc::Bsr::Gibbs::GetCyclerFromParsed 278 (281 ( 279 282 modelDef, 280 283 BysMcmc::@McmcPartialHandler::Null(0), … … 282 285 BysMcmc::@Notifier::Null(0) 283 286 ); 287 //WriteLn("TRACE "+_MID+" 9.4"); 284 288 Set Append(cycler::auxInfo,[[data]]); 285 //WriteLn( _MID+" TRACE 12");289 //WriteLn("TRACE "+_MID+" 9.5"); 286 290 cycler 287 291 };
Note: See TracChangeset
for help on using the changeset viewer.
