Example #1
0
 private Mcmc(ModelResult modelResult)
 {
     this.burninSize      = modelResult.ParentModel.MonitorBurnin ? modelResult.ParentModel.NBurnin : 0;
     this.sampleSize      = modelResult.ParentModel.NIter;
     this.cpc             = new ChainPairCreator(burninSize, sampleSize);
     this.ChainDictionary = new Dictionary <string, Chain>();
     this.quantileDef     = new Statistics.Quantile();
     this.QuantileHeader  = "," + string.Join(",", quantileDef.Probabilities.Select(p => string.Format("{0:P1}", p)));
     //chainNo = chainNumber;
 }
Example #2
0
        internal void AddWorkerMuChain(IList <Worker> worker)
        {
            ChainPairCreator cpc = new ChainPairCreator(burninSize, sampleSize);

            foreach (Worker w in worker)
            {
                ChainPairCreator.ChainPair cp = cpc.GetPair(GetWorkerChainPrefix(w.Tag));
                ChainDictionary.Add(cp.Burnin.Label, cp.Burnin);
                ChainDictionary.Add(cp.Sample.Label, cp.Sample);
            }
        }
Example #3
0
        public static ChainNamePair GetWorkerChainNames(string workerTag)
        {
            string prefix = "mu_" + workerTag;

            return(ChainPairCreator.GetChainNames(prefix));
        }
Example #4
0
 public static ChainNamePair GetChainNames(string prefix)
 {
     return(ChainPairCreator.GetChainNames(prefix));
 }