Changeset 6b0bd23 in tol
- Timestamp:
- Feb 20, 2009, 10:07:37 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 0020bfc1
- Parents:
- e875979
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/_oneNode.tol
re875979 r6b0bd23 37 37 }; 38 38 39 Text _.autodoc.member.Estim = 40 "Estimates a model with just one node, usually observational and dense." 39 Text _.autodoc.member.BuildModelDef = 40 "Creates a BSR model definition with structure of BSR.ModelDef\n" 41 "Model must have just one node, usually observational and dense." 41 42 "Model is defined as a BSR basic and an optional set of non linear filters." 42 43 "BSR will be built from simplified data argument matching this API" … … 54 55 " Set _.arima; //Set of ARIMAStruct\n" 55 56 " Real _.sigmaPriorWeight; //Weight for Bsr.Sigma.Prior.InverseGamma\n" 56 " Set _.timeInfo; // Set ofBSR.NoiseTimeInfo\n"57 " Set _.timeInfo; //BSR.NoiseTimeInfo\n" 57 58 "]];\n"; 58 Set Estim(NameBlock data_, Set nonLinFil, NameBlock config_)59 Set BuildModelDef(NameBlock data, NameBlock config_) 59 60 /////////////////////////////////////////////////////////////////////////// 60 61 { 61 62 Text _MID = "[EstimOneNode]"; 62 //Data source for model defining63 NameBlock data = data_;64 63 //WriteLn(_MID+" TRACE 1"); 65 64 //Output matrix … … 74 73 //Observational data length 75 74 Real m = VRows(Y); 76 //Number of variables at linear block 75 //Number of variables at linear block 77 76 Real n = VColumns(X); 78 77 … … 237 236 //WriteLn(_MID+" TRACE 9"); 238 237 //Building generic model definition 239 Set modelDef =BSR.ModelDef (238 BSR.ModelDef ( 240 239 docInfo = data::_.docInfo, 241 240 linearBlock, … … 249 248 VMatrix a = domain.a << order.a, 250 249 VMatrix A = domain.A << order.A 251 ); 250 ) 251 }; 252 253 Text _.autodoc.member.Estim = 254 "Estimates a model with just one node, usually observational and dense." 255 "Model is defined as a BSR basic and an optional set of non linear filters." 256 "BSR will be built from simplified data argument matching this API" 257 "NameBlock data = \n" 258 "[[\n" 259 "//Mandatory members \n" 260 " Set _.docInfo //BSR.DocInfo \n" 261 " Text _.segmentName; //Node name\n" 262 " Set _.linearParamInfo; //Set of Bsr.OneNode.LinearParamInfo\n" 263 " Anything _.Y; //Output data (Matrix or VMatrix)\n" 264 " Anything _.X; //Input data (Matrix or VMatrix)\n" 265 " Real _.sigma; //Sigma prior value, or ? to freely simulate it\n" 266 "//Optional members \n" 267 " Set _.orderRelation; //Set of Bsr.OrderRelation.Info\n" 268 " Set _.arima; //Set of ARIMAStruct\n" 269 " Real _.sigmaPriorWeight; //Weight for Bsr.Sigma.Prior.InverseGamma\n" 270 " Set _.timeInfo; //BSR.NoiseTimeInfo\n" 271 "]];\n"; 272 Set Estim(NameBlock data, Set nonLinFil, NameBlock config_) 273 /////////////////////////////////////////////////////////////////////////// 274 { 275 Text _MID = "[EstimOneNode]"; 276 //Data source for model defining 277 Set modelDef = BuildModelDef(data, config_); 252 278 Set result = If(Not(config_::mcmc.sampleLength), [[data, modelDef]], 253 279 {
Note: See TracChangeset
for help on using the changeset viewer.
